public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Maurice van der Pot <griffon26@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] What to do with things like -fpie in CFLAGS in environment?
Date: Tue, 12 Apr 2005 17:59:53 +0200	[thread overview]
Message-ID: <20050412155953.GM8632@kfk4ever.com> (raw)

[-- 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 --]

             reply	other threads:[~2005-04-12 15:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-12 15:59 Maurice van der Pot [this message]
2005-04-12 16:10 ` [gentoo-dev] What to do with things like -fpie in CFLAGS in environment? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050412155953.GM8632@kfk4ever.com \
    --to=griffon26@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox