[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug work-around?
From: |
Paul D. Smith |
Subject: |
Re: bug work-around? |
Date: |
Wed, 30 Oct 2002 13:58:50 -0500 |
%% "Albert D. Cahalan" <address@hidden> writes:
adc> so I need to do something else. Oddly, I don't get the crash on
adc> either x86 Red Hat 7 or PowerPC debian-testing.
A patch for this bug has been floating around for many months, so it's
possible the versions of 3.79.1 you're using on the other platforms have
been patched.
adc> What I really want is a CFLAGS default that the user can
adc> override, except that "-fpic" is always added when compiling the
adc> library.
I don't think this will do what you want, then, even if it didn't
crash. Command-line overrides take precedence over variable settings,
even target-specific variable settings. You'd have to do this:
$(LIBOBJ): override CFLAGS += -fpic
although I'm not sure if that actually works or not :).
Typically what one does is _NOT_ use CFLAGS for this; as per the GNU
standards you use a different variable in the makefile to store C
compiler flags and you let users have CFLAGS for their own use. Then
you just put both variables into the compile line.
Often you leave the debug/optimize switches in CFLAGS so users can
override them easily.
As for a workaround, there's nothing really elegant I can think of that
doesn't involve recursion.
That's what has always bothered me about Miller's paper: he makes
non-recursive make all sound very cool, but when it comes to actual
thoughts about _how_ to implement something like this in a moderately
complex environment (which most are these days, what with auto* tools,
gettext, etc. etc.) there's mainly a lot of hand-waving... :).
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
- bug work-around?, Albert D. Cahalan, 2002/10/30
- Re: bug work-around?,
Paul D. Smith <=