Closed GoogleCodeExporter closed 8 years ago
The Makefile currently passes LDFLAGS at the end of the $(CC) line, so I do not
see
the problem in the context of that doc?
Your patch just renames LDFLAGS to LIBS.
Original comment by lcam...@gmail.com
on 23 Mar 2010 at 7:20
I mean, you could just as easily keep LDFLAGS named as-is, and include env
ADD_LDFLAGS
for your needs, but I don't understand what this is trying to accomplish - if
something distro-specific, why not just apply a patch to add the options you
want?
Original comment by lcam...@gmail.com
on 23 Mar 2010 at 7:23
[And for what it's worth, I'm pretty sure that --as-needed makes absolutely no
difference for skipfish, as it does not come with any elaborate linking
dependencies.]
Original comment by lcam...@gmail.com
on 23 Mar 2010 at 7:25
The general part:
It makes sense to respect standard environment variables and when you can add
+= and
?= operators to Makefile, it's also easy... there's no need to "invent" more
names
for them.
The distro specific part:
The LDFLAGS come from the /etc/make.conf gentoo-distro specific file to the
package
manager (Portage, in this case) and gets exported to environment for
build-time. So
when I have LDFLAGS="-Wl,--as-needed" in /etc/make.conf, I expect every single
package to use it.
That said, there's likely not much gain for you as upstream to add this feature
to
skipfish, but I'm asking you still do, just to make it compatible with Gentoo's
standards and we can easily include your software :)
Thanks!
Original comment by ssuomi...@unk.fi
on 23 Mar 2010 at 9:45
Just some example,
http://sources.redhat.com/automake/automake.html#Standard-Configuration-Variable
s
e.g. -D flags go to CPPFLAGS += -Dsomething
optimization flags for CC go as CFLAGS += -O3 -g -ggdb
extra LDFLAGS go as LDFLAGS += -Wl,-something
default CC goes as something like CC ?= gcc
Then
$(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) $(objects-variable) $(libs-variable)
Original comment by ssuomi...@unk.fi
on 23 Mar 2010 at 9:52
Some references to similar fixing,
http://blog.flameeyes.eu/2008/10/15/fixing-cflags-ldflags-handling-with-a-single
-boilerplate-makefile
http://www.mail-archive.com/libvir-list@redhat.com/msg19082.html
Original comment by ssuomi...@unk.fi
on 23 Mar 2010 at 9:58
Ok, thanks for the explanation. The upcoming version will honor external
CFLAGS,
LDFLAGS, just pending some other bugfixes.
Original comment by lcam...@gmail.com
on 23 Mar 2010 at 5:03
thanks :)
meanwhile, i've packaged skipfish
http://packages.gentoo.org/package/dev-util/skipfish
Original comment by ssuomi...@unk.fi
on 23 Mar 2010 at 6:39
Original issue reported on code.google.com by
ssuomi...@unk.fi
on 23 Mar 2010 at 7:12Attachments: