Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 132742 - htmltidy needs to use LDFLAGS in htmldb subdir
Summary: htmltidy needs to use LDFLAGS in htmldb subdir
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-08 17:40 UTC by Jonathan Briggs
Modified: 2006-05-09 09:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Briggs 2006-05-08 17:40:51 UTC
I have been building with -fstack-protector in GCC 4.1 lately, and discovered that I need it in CFLAGS and LDFLAGS.  This works with almost every package except a few.  htmltidy is one of these.

The optional htmldb subdir, included by use xml, has a very simple Makefile that does not use LDFLAGS in its link steps.

Easy fix, just include $(LDFLAGS) on the link lines.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-05-08 23:38:16 UTC
Reopen with some errors you get, I don't understand this bug. Stuff like -fstack-protector doesn't belong into LDFLAGS; also using this thing globally in C[XX]FLAGS is just asking for trouble.
Comment 2 Jonathan Briggs 2006-05-09 09:39:33 UTC
(In reply to comment #1)
> Reopen with some errors you get, I don't understand this bug. Stuff like
> -fstack-protector doesn't belong into LDFLAGS; also using this thing globally
> in C[XX]FLAGS is just asking for trouble.

Well, after looking at the problem again, I see that I was wrong about the cause here.  So leave this bug closed.

But to answer your question, -fstack-protector needs to be in CFLAGS so that it is built into the objects, and it needs to be in LDFLAGS because many makefiles do not use CFLAGS when linking the object files into the executable.

It needs to be specified for both compile and link stages because it needs to link in libraries as well as adding code using those libraries to each function call.

I don't understand why you feel it is a bad idea to use this flag globally.  It hasn't caused me any major problems so far beyond forcing me to rebuild some applications that depend on libraries that were rebuilt with the flag.