public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] What to do with things like -fpie in CFLAGS in environment?
@ 2005-04-12 15:59 Maurice van der Pot
  2005-04-12 16:10 ` Daniel Ostrow
  2005-04-12 17:52 ` Mike Frysinger
  0 siblings, 2 replies; 15+ messages in thread
From: Maurice van der Pot @ 2005-04-12 15:59 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1619 bytes --]

I have the following situation:
- a package (valgrind) that can be compiled with PIE and uses PIE
  for some purpose or other if it is supported
- tests (make check) that cannot be compiled with PIE

In the upstream release CFLAGS is reset to "-Wno-long-long", but I would
prefer to allow customised CFLAGS. I already asked the developers why
they reset the CFLAGS, but I haven't received an answer.
I made a small modification to configure to enable the use of make.conf's 
CFLAGS, but now some problems occur. The first problem is a problem even
without this modification.

If compiled with the hardened gcc profile, -fno-pie has to be specified
when compiling the tests or it will fail. Specifying -fno-pie always
will force me to disable any PIE support through configure as well.

I tried to adapt the makefiles to disable pie themselves for the tests
only, but then I have another problem:

What if the user specifies -fpie in make.conf? 
The compilation of the tests will fail because -fpie (from the environment) 
will end up in CFLAGS after -fno-pie (from the makefile).
If I use flag-o-matic to filter out -fpie, it will add -fno-pie everywhere
and disable PIE altogether.

I'm looking for a solution that preferably:
- uses (some of) make.conf's CFLAGS
- compiles with all gcc profiles and all CFLAGS (filtering some is ok)
- does not disable PIE altogether

Is there such a solution?

Maurice.

-- 
Maurice van der Pot

Gentoo Linux Developer   griffon26@gentoo.org     http://www.gentoo.org
Creator of BiteMe!       griffon26@kfk4ever.com   http://www.kfk4ever.com


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2005-04-15 20:36 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-12 15:59 [gentoo-dev] What to do with things like -fpie in CFLAGS in environment? Maurice van der Pot
2005-04-12 16:10 ` Daniel Ostrow
2005-04-12 20:41   ` Maurice van der Pot
2005-04-15 19:27   ` Maurice van der Pot
2005-04-15 19:38     ` Mike Frysinger
2005-04-15 19:55       ` Maurice van der Pot
2005-04-15 20:05         ` Mike Frysinger
2005-04-15 20:28           ` Maurice van der Pot
2005-04-15 19:40     ` Stephen Bennett
2005-04-15 19:52       ` Maurice van der Pot
2005-04-15 20:13     ` Vibhav Garg
2005-04-15 20:36       ` Mike Frysinger
2005-04-12 17:52 ` Mike Frysinger
2005-04-12 18:20   ` Maurice van der Pot
2005-04-12 20:13     ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox