Sorry I think we had a bit of misunderstanding here,
1.15b's Makefile has:
LDFLAGS += -lcrypto -lssl -lidn -lz -L/usr/local/lib/ -L/opt/local/lib
$(CC) $(PROGNAME).c -o $(PROGNAME) $(CFLAGS_OPT) $(OBJFILES) $(LDFLAGS)
This won't work because LDFLAGS are appended too late, and as such, are
ignored.
It should be:
LIBS = -lcrypto -lssl -lidn -lz -L/usr/local/lib/ -L/opt/local/lib
$(CC) $(LDFLAGS) $(PROGNAME).c -o $(PROGNAME) $(CFLAGS_OPT) \
$(OBJFILES) $(LIBS)
In order to respect environment's LDFLAGS they can't be mixed with -l
flags... and even when not respecting them, `make LDFLAGS=""` as argument
would be broken.
(That's what I really tried to say on the previous bug, and got a bit
sidetracked by other vars there, I guess, sorry...)
Attached is the way I would write it...
Then you can:
export CFLAGS="-march=core2 -pipe -O2"
export LDFLAGS="-Wl,--as-needed"
make debug -> -g -ggdb is only appended then, and above is used
make -> build with upstream optimization, -O3, above is
prepended to this too
make OPT_CFLAGS="" -> use only your own above environment flags
Original issue reported on code.google.com by ssuomi...@unk.fi on 23 Mar 2010 at 10:27
Original issue reported on code.google.com by
ssuomi...@unk.fi
on 23 Mar 2010 at 10:27Attachments: