public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] automatically killing invalid CFLAGS/warning about bad CFLAGS
@ 2006-04-13 19:50 Patrick McLean
  2006-04-13 23:51 ` [gentoo-dev] " Duncan
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Patrick McLean @ 2006-04-13 19:50 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

For about a month now, we (amd64) have had some code in our
profile.bashrc that filters CFLAGS that are unrecognized by gcc, and
warnings the user about bad CFLAGS.

So far it has worked fairly well, and it has really cut down on the
number of bugs that filed by people with extreme ricer CFLAGS. It might
be an idea to have something similar in the global bashrc, and have a
system for arches to customize the CFLAGS that are warned about.

The code is at gentoo-x86/profiles/default-linux/amd64/profile.bashrc
for those who want to see it.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEPqtzWt/XSf2CZdkRArCCAKCR66ousc1+FGOMvz9hGxqFsA0jWQCfbyEM
YexV1DYsR286gW+XGyG9Ah4=
=ha1J
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list



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

* [gentoo-dev]  Re: automatically killing invalid CFLAGS/warning about bad CFLAGS
  2006-04-13 19:50 [gentoo-dev] automatically killing invalid CFLAGS/warning about bad CFLAGS Patrick McLean
@ 2006-04-13 23:51 ` Duncan
  2006-04-14  2:22 ` [gentoo-dev] " Alec Warner
  2006-04-14  3:01 ` [gentoo-dev] " R Hill
  2 siblings, 0 replies; 18+ messages in thread
From: Duncan @ 2006-04-13 23:51 UTC (permalink / raw
  To: gentoo-dev

Patrick McLean posted <443EAB73.6030804@gentoo.org>, excerpted below,  on
Thu, 13 Apr 2006 15:50:11 -0400:

> For about a month now, we (amd64) have had some code in our
> profile.bashrc that filters CFLAGS that are unrecognized by gcc, and
> warnings the user about bad CFLAGS.
> 
> So far it has worked fairly well, and it has really cut down on the
> number of bugs that filed by people with extreme ricer CFLAGS. It might
> be an idea to have something similar in the global bashrc, and have a
> system for arches to customize the CFLAGS that are warned about.
> 
> The code is at gentoo-x86/profiles/default-linux/amd64/profile.bashrc
> for those who want to see it.

Not just ricer flags (or I wouldn't call them that anyway and unlike
some, can explain each one and why I use it)...  I'm running gcc-4.0.x and
4.1.0, the latter as my default compiler, in addition to 3.4.6.  One of
the flags I use (-ftree-pre) isn't recognized by 3.4.x, and it has been a
bit of a hassle removing it each time I revert to 3.4.6 to test something
or other.

I've been /very/ impressed with the way this works, as now I don't have to
worry about killing the flag when I switch gccs, because the profile code
kills it for me! =8^)  The first time I noticed it, I wondered what kind
of magic the ebuild was doing.  Then I saw it on a couple others, and then
happened across it while reviewing the profile.  It works!  =8^)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman in
http://www.linuxdevcenter.com/pub/a/linux/2004/12/22/rms_interview.html


-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] automatically killing invalid CFLAGS/warning about bad CFLAGS
  2006-04-13 19:50 [gentoo-dev] automatically killing invalid CFLAGS/warning about bad CFLAGS Patrick McLean
  2006-04-13 23:51 ` [gentoo-dev] " Duncan
@ 2006-04-14  2:22 ` Alec Warner
  2006-04-14  2:49   ` Patrick McLean
  2006-04-14  3:01 ` [gentoo-dev] " R Hill
  2 siblings, 1 reply; 18+ messages in thread
From: Alec Warner @ 2006-04-14  2:22 UTC (permalink / raw
  To: gentoo-dev

Patrick McLean wrote:
> For about a month now, we (amd64) have had some code in our
> profile.bashrc that filters CFLAGS that are unrecognized by gcc, and
> warnings the user about bad CFLAGS.
> 
> So far it has worked fairly well, and it has really cut down on the
> number of bugs that filed by people with extreme ricer CFLAGS. It might
> be an idea to have something similar in the global bashrc, and have a
> system for arches to customize the CFLAGS that are warned about.
> 
> The code is at gentoo-x86/profiles/default-linux/amd64/profile.bashrc
> for those who want to see it.

Except you need a way for them to turn it off, and you do not currently
provide one.  We can set default flags all we want, but I don't see
filtering 'bad' flags as necessarily our problem.  If you want to say:

"Hey we have had issues with people filing bogus bug reports with CFLAGS
that are completely inappropriate, so by default we check the sanity of
your CFLAGS, this is how you turn those checks off." then I'd be ok with it.

Most of the Ricers won't read it, and maybe you can print a warning that
CFLAG checking is disabled.

However leaving it on all the time merely imposes penalties on the power
users who wish to use your profile.  Your profile is a tool that should
be useful to all classes of users.

-Alec Warner
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] automatically killing invalid CFLAGS/warning about bad CFLAGS
  2006-04-14  2:22 ` [gentoo-dev] " Alec Warner
@ 2006-04-14  2:49   ` Patrick McLean
  2006-04-14  6:27     ` Harald van =?unknown-8bit?Q?D=C4=B3k?=
  0 siblings, 1 reply; 18+ messages in thread
From: Patrick McLean @ 2006-04-14  2:49 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alec Warner wrote:
> 
> Except you need a way for them to turn it off, and you do not currently
> provide one.  We can set default flags all we want, but I don't see
> filtering 'bad' flags as necessarily our problem.  If you want to say:
> 
> "Hey we have had issues with people filing bogus bug reports with CFLAGS
> that are completely inappropriate, so by default we check the sanity of
> your CFLAGS, this is how you turn those checks off." then I'd be ok with it.
>
> Most of the Ricers won't read it, and maybe you can print a warning that
> CFLAG checking is disabled.
> 
> However leaving it on all the time merely imposes penalties on the power
> users who wish to use your profile.  Your profile is a tool that should
> be useful to all classes of users.
> 

The only flags that are actually removed are the _invalid_ flags. These are the
flags that gcc does not accept, and will error out on. The "bad" flags, IE the
ones that the developers consider to be broken, but that are accepted by gcc are
not filtered, the profile simply prints a warning and pauses for 5 seconds to
encourage users to read the warning, it does not automatically filter any flags
that the compiler accepts.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEPw20Wt/XSf2CZdkRAotCAJ9pRFXAbPine5qYbycGXoeDWyy+DACaA84z
KZ43edqxiv30vniE2e2wxlc=
=0vEQ
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list



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

* [gentoo-dev]  Re: automatically killing invalid CFLAGS/warning about bad CFLAGS
  2006-04-13 19:50 [gentoo-dev] automatically killing invalid CFLAGS/warning about bad CFLAGS Patrick McLean
  2006-04-13 23:51 ` [gentoo-dev] " Duncan
  2006-04-14  2:22 ` [gentoo-dev] " Alec Warner
@ 2006-04-14  3:01 ` R Hill
  2006-04-14  3:07   ` Donnie Berkholz
  2006-04-25 13:29   ` James Potts
  2 siblings, 2 replies; 18+ messages in thread
From: R Hill @ 2006-04-14  3:01 UTC (permalink / raw
  To: gentoo-dev

Patrick McLean wrote:
> For about a month now, we (amd64) have had some code in our
> profile.bashrc that filters CFLAGS that are unrecognized by gcc, and
> warnings the user about bad CFLAGS.

The broken flags part is useful.

> So far it has worked fairly well, and it has really cut down on the
> number of bugs that filed by people with extreme ricer CFLAGS. It might
> be an idea to have something similar in the global bashrc, and have a
> system for arches to customize the CFLAGS that are warned about.

There's an endless number of CFLAGS that could be warned about, and just as many 
situations where they're actually useful.  Aside, I've yet to hear of _anything_ 
that's broken because of -fvisibility-inlines-hidden. (course someone will 
undoubtedly point one out now ;))

Maybe if the sleep 5 were removed this would be helpful.  Right now i'm just 
rm-ing the bashrc in my --sync alias.


--de.

-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev]  Re: automatically killing invalid CFLAGS/warning about bad CFLAGS
  2006-04-14  3:01 ` [gentoo-dev] " R Hill
@ 2006-04-14  3:07   ` Donnie Berkholz
  2006-04-14  3:39     ` R Hill
  2006-04-25 13:29   ` James Potts
  1 sibling, 1 reply; 18+ messages in thread
From: Donnie Berkholz @ 2006-04-14  3:07 UTC (permalink / raw
  To: gentoo-dev

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

R Hill wrote:
> There's an endless number of CFLAGS that could be warned about, and just
> as many situations where they're actually useful.  Aside, I've yet to
> hear of _anything_ that's broken because of -fvisibility-inlines-hidden.
> (course someone will undoubtedly point one out now ;))

How about kde?


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

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

* [gentoo-dev]  Re: automatically killing invalid CFLAGS/warning   about bad CFLAGS
  2006-04-14  3:07   ` Donnie Berkholz
@ 2006-04-14  3:39     ` R Hill
  2006-04-14  5:53       ` Harald van =?unknown-8bit?Q?D=C4=B3k?=
  0 siblings, 1 reply; 18+ messages in thread
From: R Hill @ 2006-04-14  3:39 UTC (permalink / raw
  To: gentoo-dev

Donnie Berkholz wrote:
> R Hill wrote:
>> There's an endless number of CFLAGS that could be warned about, and just
>> as many situations where they're actually useful.  Aside, I've yet to
>> hear of _anything_ that's broken because of -fvisibility-inlines-hidden.
>> (course someone will undoubtedly point one out now ;))
> 
> How about kde?

Close, that's -fvisibility=hidden. :)

   http://gcc.gnu.org/gcc-4.0/changes.html#visibility

--de.

-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev]  Re: automatically killing invalid CFLAGS/warning   about bad CFLAGS
  2006-04-14  3:39     ` R Hill
@ 2006-04-14  5:53       ` Harald van =?unknown-8bit?Q?D=C4=B3k?=
  2006-04-14  7:17         ` Jakub Moc
  0 siblings, 1 reply; 18+ messages in thread
From: Harald van =?unknown-8bit?Q?D=C4=B3k?= @ 2006-04-14  5:53 UTC (permalink / raw
  To: gentoo-dev

On Thu, Apr 13, 2006 at 09:39:28PM -0600, R Hill wrote:
> Donnie Berkholz wrote:
> >R Hill wrote:
> >>There's an endless number of CFLAGS that could be warned about, and just
> >>as many situations where they're actually useful.  Aside, I've yet to
> >>hear of _anything_ that's broken because of -fvisibility-inlines-hidden.
> >>(course someone will undoubtedly point one out now ;))
> >
> >How about kde?
> 
> Close, that's -fvisibility=hidden. :)
> 
>   http://gcc.gnu.org/gcc-4.0/changes.html#visibility
> 
> --de.

kdevelop used to not compile with -fvisibility-inlines-hidden, not sure
if that's changed now.
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] automatically killing invalid CFLAGS/warning about bad CFLAGS
  2006-04-14  2:49   ` Patrick McLean
@ 2006-04-14  6:27     ` Harald van =?unknown-8bit?Q?D=C4=B3k?=
  2006-04-14 17:47       ` Patrick McLean
  0 siblings, 1 reply; 18+ messages in thread
From: Harald van =?unknown-8bit?Q?D=C4=B3k?= @ 2006-04-14  6:27 UTC (permalink / raw
  To: gentoo-dev

On Thu, Apr 13, 2006 at 10:49:24PM -0400, Patrick McLean wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Alec Warner wrote:
> > 
> > Except you need a way for them to turn it off, and you do not currently
> > provide one.  We can set default flags all we want, but I don't see
> > filtering 'bad' flags as necessarily our problem.  If you want to say:
> > 
> > "Hey we have had issues with people filing bogus bug reports with CFLAGS
> > that are completely inappropriate, so by default we check the sanity of
> > your CFLAGS, this is how you turn those checks off." then I'd be ok with it.
> >
> > Most of the Ricers won't read it, and maybe you can print a warning that
> > CFLAG checking is disabled.
> > 
> > However leaving it on all the time merely imposes penalties on the power
> > users who wish to use your profile.  Your profile is a tool that should
> > be useful to all classes of users.
> > 
> 
> The only flags that are actually removed are the _invalid_ flags. These are the
> flags that gcc does not accept, and will error out on. The "bad" flags, IE the
> ones that the developers consider to be broken, but that are accepted by gcc are
> not filtered, the profile simply prints a warning and pauses for 5 seconds to
> encourage users to read the warning, it does not automatically filter any flags
> that the compiler accepts.

The only flags that are actually removed are the flags that are invalid
_by themselves_. There are cases where flags are valid because of other
flags, such as anything following -X*.

Two other problems I see with the code:
CFLAGS=${CFLAGS//bad-flag} is in the ebuild quiz, if I recall correctly.
It's broken because it also removes valid flags that happen to contain
bad-flag as a substring.
Locale isn't forced to C, which means gcc may not spit out 'unrecognized
option' at all even for invalid flags.
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev]  Re: automatically killing invalid CFLAGS/warning about bad CFLAGS
  2006-04-14  5:53       ` Harald van =?unknown-8bit?Q?D=C4=B3k?=
@ 2006-04-14  7:17         ` Jakub Moc
  0 siblings, 0 replies; 18+ messages in thread
From: Jakub Moc @ 2006-04-14  7:17 UTC (permalink / raw
  To: gentoo-dev

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

Harald van Dijk wrote:
> On Thu, Apr 13, 2006 at 09:39:28PM -0600, R Hill wrote:
>> Donnie Berkholz wrote:
>>> R Hill wrote:
>>>> There's an endless number of CFLAGS that could be warned about, and just
>>>> as many situations where they're actually useful.  Aside, I've yet to
>>>> hear of _anything_ that's broken because of -fvisibility-inlines-hidden.
>>>> (course someone will undoubtedly point one out now ;))
>>> How about kde?
>> Close, that's -fvisibility=hidden. :)
>>
>>   http://gcc.gnu.org/gcc-4.0/changes.html#visibility
>>
>> --de.
> 
> kdevelop used to not compile with -fvisibility-inlines-hidden, not sure
> if that's changed now.

Sure enough it's changed - kde.eclass now filters all this visibility
crap (-fvisibility=hidden *and* -fvisibility-inlines-hidden) by default
because it bombs out really badly... :)

http://groups.google.de/group/linux.gentoo.dev/browse_frm/thread/f43fac917352bb51/5093e84871f08de6?lnk=st

More fun:

https://bugs.kde.org/show_bug.cgi?id=109386
http://planet.gentoo.org/developers/flameeyes/2005/11/16/happy_the_visibility_stuff_goes_away
http://planet.gentoo.org/developers/flameeyes/2005/10/06/ehi_i_m_invisible


-- 
Best regards,

 Jakub Moc
 mailto:jakub@gentoo.org
 GPG signature:
 http://subkeys.pgp.net:11371/pks/lookup?op=get&search=0xCEBA3D9E
 Primary key fingerprint: D2D7 933C 9BA1 C95B 2C95  B30F 8717 D5FD CEBA 3D9E

 ... still no signature   ;)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

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

* Re: [gentoo-dev] automatically killing invalid CFLAGS/warning about bad CFLAGS
  2006-04-14  6:27     ` Harald van =?unknown-8bit?Q?D=C4=B3k?=
@ 2006-04-14 17:47       ` Patrick McLean
  2006-04-14 18:04         ` Joshua Nichols
                           ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Patrick McLean @ 2006-04-14 17:47 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Harald van D?k wrote:
> The only flags that are actually removed are the flags that are invalid
> _by themselves_. There are cases where flags are valid because of other
> flags, such as anything following -X*.
>
> Two other problems I see with the code:
> CFLAGS=${CFLAGS//bad-flag} is in the ebuild quiz, if I recall correctly.
> It's broken because it also removes valid flags that happen to contain
> bad-flag as a substring.
> Locale isn't forced to C, which means gcc may not spit out 'unrecognized
> option' at all even for invalid flags.

There is a new version at http://dev.gentoo.org/~chutzpah/profile.bashrc that
should fix all these possible problems. Thanks for pointing them out, let me
know if you see anything else.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEP+A9Wt/XSf2CZdkRArP3AKCZZQd7V7oBTsQnxzBMDXX9VGnxpQCbBm4l
vr359Gk/O0NPPk2/2CnUPw8=
=3HQj
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] automatically killing invalid CFLAGS/warning about bad CFLAGS
  2006-04-14 17:47       ` Patrick McLean
@ 2006-04-14 18:04         ` Joshua Nichols
  2006-04-14 18:16           ` Patrick McLean
  2006-04-14 19:17         ` Harald van =?unknown-8bit?Q?D=C4=B3k?=
  2006-04-14 22:49         ` Mike Frysinger
  2 siblings, 1 reply; 18+ messages in thread
From: Joshua Nichols @ 2006-04-14 18:04 UTC (permalink / raw
  To: gentoo-dev

Patrick McLean wrote:
> Harald van D?k wrote:
> >> The only flags that are actually removed are the flags that are invalid
> >> _by themselves_. There are cases where flags are valid because of other
> >> flags, such as anything following -X*.
> >>
> >> Two other problems I see with the code:
> >> CFLAGS=${CFLAGS//bad-flag} is in the ebuild quiz, if I recall
> correctly.
> >> It's broken because it also removes valid flags that happen to contain
> >> bad-flag as a substring.
> >> Locale isn't forced to C, which means gcc may not spit out
> 'unrecognized
> >> option' at all even for invalid flags.
>
> There is a new version at
> http://dev.gentoo.org/~chutzpah/profile.bashrc that
> should fix all these possible problems. Thanks for pointing them out,
> let me
> know if you see anything else.
Around line 77, you have:
        hasme ${flag} ${CFLAGS} ${CXXFLAGS} && trigger=1 && \
        ewarn "Your C(XX)FLAGS contain(s) \"${flag}\" which can break
packages."

Might I suggest you change it to something like:

    if hasme ${flag} ${CFLAGS} ${CXXFLAGS}; then
       trigger=1
       ewarn "Your C(XX)FLAGS contain(s) \"${flag}\" which can break
packages."
    fi

While there's nothing wrong with the original way, my suggestion would
make it a bit more obvious that you're setting the 'trigger' flag.

Regards,

Josh
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] automatically killing invalid CFLAGS/warning about bad CFLAGS
  2006-04-14 18:04         ` Joshua Nichols
@ 2006-04-14 18:16           ` Patrick McLean
  0 siblings, 0 replies; 18+ messages in thread
From: Patrick McLean @ 2006-04-14 18:16 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joshua Nichols wrote:
> Patrick McLean wrote:
>> There is a new version at
>> http://dev.gentoo.org/~chutzpah/profile.bashrc that
>> should fix all these possible problems. Thanks for pointing them out,
> Around line 77, you have:
>         hasme ${flag} ${CFLAGS} ${CXXFLAGS} && trigger=1 && \
>         ewarn "Your C(XX)FLAGS contain(s) \"${flag}\" which can break
> packages."
> 
> Might I suggest you change it to something like:
> 
>     if hasme ${flag} ${CFLAGS} ${CXXFLAGS}; then
>        trigger=1
>        ewarn "Your C(XX)FLAGS contain(s) \"${flag}\" which can break
> packages."
>     fi
> 
Done.

> While there's nothing wrong with the original way, my suggestion would
> make it a bit more obvious that you're setting the 'trigger' flag.
> 
Readability is always a good thing :)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEP+cJWt/XSf2CZdkRAoGtAJ9e8CViKyluILpEH07J3i50ciuNnwCZAVu/
M94FKLlae7tyTRZ8TsE40zA=
=XkHW
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] automatically killing invalid CFLAGS/warning about bad CFLAGS
  2006-04-14 17:47       ` Patrick McLean
  2006-04-14 18:04         ` Joshua Nichols
@ 2006-04-14 19:17         ` Harald van =?unknown-8bit?Q?D=C4=B3k?=
  2006-04-14 22:49         ` Mike Frysinger
  2 siblings, 0 replies; 18+ messages in thread
From: Harald van =?unknown-8bit?Q?D=C4=B3k?= @ 2006-04-14 19:17 UTC (permalink / raw
  To: gentoo-dev

On Fri, Apr 14, 2006 at 01:47:41PM -0400, Patrick McLean wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Harald van D?k wrote:
> > The only flags that are actually removed are the flags that are invalid
> > _by themselves_. There are cases where flags are valid because of other
> > flags, such as anything following -X*.
> >
> > Two other problems I see with the code:
> > CFLAGS=${CFLAGS//bad-flag} is in the ebuild quiz, if I recall correctly.
> > It's broken because it also removes valid flags that happen to contain
> > bad-flag as a substring.
> > Locale isn't forced to C, which means gcc may not spit out 'unrecognized
> > option' at all even for invalid flags.
> 
> There is a new version at http://dev.gentoo.org/~chutzpah/profile.bashrc that
> should fix all these possible problems. Thanks for pointing them out, let me
> know if you see anything else.

For the locale stuff, you're not exporting LC_ALL, which means if LC_ALL
is unset, and LC_MESSAGES is set, gcc might still spit out French (for
example) error messages. Also, it can be made simpler: changing the
command to `LC_ALL=C ${myprog} ${@} -E - 2>&1` should do it. LC_ALL
overrides LANG, so that can be left alone, and adding it right in front
of the command makes sure it gets exported, but not in the current
shell, so there's no need to manually restore it.
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] automatically killing invalid CFLAGS/warning about bad CFLAGS
  2006-04-14 17:47       ` Patrick McLean
  2006-04-14 18:04         ` Joshua Nichols
  2006-04-14 19:17         ` Harald van =?unknown-8bit?Q?D=C4=B3k?=
@ 2006-04-14 22:49         ` Mike Frysinger
  2 siblings, 0 replies; 18+ messages in thread
From: Mike Frysinger @ 2006-04-14 22:49 UTC (permalink / raw
  To: gentoo-dev

On Friday 14 April 2006 13:47, Patrick McLean wrote:
> There is a new version at http://dev.gentoo.org/~chutzpah/profile.bashrc
> that should fix all these possible problems. Thanks for pointing them out,
> let me know if you see anything else.

that hasme() func can be replaced with 1 line of code ... look at how i 
rewrote has() in latest portage 2.1-pre
-mike
-- 
gentoo-dev@gentoo.org mailing list



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

* [gentoo-dev]  Re: automatically killing invalid CFLAGS/warning about bad CFLAGS
  2006-04-14  3:01 ` [gentoo-dev] " R Hill
  2006-04-14  3:07   ` Donnie Berkholz
@ 2006-04-25 13:29   ` James Potts
  2006-04-27  5:24     ` R Hill
  1 sibling, 1 reply; 18+ messages in thread
From: James Potts @ 2006-04-25 13:29 UTC (permalink / raw
  To: gentoo-dev

R Hill <dirtyepic.sk <at> gmail.com> writes:

> I've yet to hear of _anything_ that's broken because of
> -fvisibility-inlines-hidden. (course someone will undoubtedly point
> one out now ;))
> 

-fvisibility-inlines-hidden not only breaks a number of kde apps afaik (it's
filtered now), but it also seems to break SDL (using noflagstrip).  It's not
broken enough that I'm going to remove it from my global CXXFLAGS, tho,
especially since if it breaks something I know about it right away (compile
error) and can remove the flag for that package.

--James


-- 
gentoo-dev@gentoo.org mailing list



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

* [gentoo-dev]  Re: automatically killing invalid CFLAGS/warning about bad CFLAGS
  2006-04-25 13:29   ` James Potts
@ 2006-04-27  5:24     ` R Hill
  2006-04-28 15:06       ` James Potts
  0 siblings, 1 reply; 18+ messages in thread
From: R Hill @ 2006-04-27  5:24 UTC (permalink / raw
  To: gentoo-dev

James Potts wrote:

> -fvisibility-inlines-hidden not only breaks a number of kde apps afaik (it's
> filtered now),

Again, probably -fvisibility=hidden.  Many people have had success building KDE 
with both flags enabled lately, so maybe that's something that could be 
revisited when 4.1 goes ~arch.  Getting off topic here, so see 
http://forums.gentoo.org/viewtopic-t-426814.html if you're interested.

  but it also seems to break SDL (using noflagstrip).

-fvisibility-inlines-hidden affects C++ code.  libsdl is written in C. ;)

> It's not
> broken enough that I'm going to remove it from my global CXXFLAGS, tho,
> especially since if it breaks something I know about it right away (compile
> error) and can remove the flag for that package.

Right, so you don't find that `sleep 5` at the beginning of every single emerge 
just a little annoying? ;)

--de.

-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] Re: automatically killing invalid CFLAGS/warning about bad CFLAGS
  2006-04-27  5:24     ` R Hill
@ 2006-04-28 15:06       ` James Potts
  0 siblings, 0 replies; 18+ messages in thread
From: James Potts @ 2006-04-28 15:06 UTC (permalink / raw
  To: gentoo-dev

I find it a little annoying, but not that annoying.  I have a few
checks to make on libsdl, since it did fail with my CFLAGS settings. 
Perhaps it's not -fvisibility-inlines-hidden.  As for KDE apps, didn't
someone mention earlier that these ebuilds now filter
-fvisibility-inlines-hidden?  This doesn't fix the problem with the
flag, it just covers it up.  In any case, it's a possible problem that
I will put up with.  btw, I'm not using visibility=hidden (dev-only
flag, not for users).

--James Potts


On 4/27/06, R Hill <dirtyepic.sk@gmail.com> wrote:
> James Potts wrote:
>
> > -fvisibility-inlines-hidden not only breaks a number of kde apps afaik (it's
> > filtered now),
>
> Again, probably -fvisibility=hidden.  Many people have had success building KDE
> with both flags enabled lately, so maybe that's something that could be
> revisited when 4.1 goes ~arch.  Getting off topic here, so see
> http://forums.gentoo.org/viewtopic-t-426814.html if you're interested.
>
>  but it also seems to break SDL (using noflagstrip).
>
> -fvisibility-inlines-hidden affects C++ code.  libsdl is written in C. ;)
>
> > It's not
> > broken enough that I'm going to remove it from my global CXXFLAGS, tho,
> > especially since if it breaks something I know about it right away (compile
> > error) and can remove the flag for that package.
>
> Right, so you don't find that `sleep 5` at the beginning of every single emerge
> just a little annoying? ;)
>
> --de.
>
> --
> gentoo-dev@gentoo.org mailing list
>
>

-- 
gentoo-dev@gentoo.org mailing list



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

end of thread, other threads:[~2006-04-28 15:11 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-13 19:50 [gentoo-dev] automatically killing invalid CFLAGS/warning about bad CFLAGS Patrick McLean
2006-04-13 23:51 ` [gentoo-dev] " Duncan
2006-04-14  2:22 ` [gentoo-dev] " Alec Warner
2006-04-14  2:49   ` Patrick McLean
2006-04-14  6:27     ` Harald van =?unknown-8bit?Q?D=C4=B3k?=
2006-04-14 17:47       ` Patrick McLean
2006-04-14 18:04         ` Joshua Nichols
2006-04-14 18:16           ` Patrick McLean
2006-04-14 19:17         ` Harald van =?unknown-8bit?Q?D=C4=B3k?=
2006-04-14 22:49         ` Mike Frysinger
2006-04-14  3:01 ` [gentoo-dev] " R Hill
2006-04-14  3:07   ` Donnie Berkholz
2006-04-14  3:39     ` R Hill
2006-04-14  5:53       ` Harald van =?unknown-8bit?Q?D=C4=B3k?=
2006-04-14  7:17         ` Jakub Moc
2006-04-25 13:29   ` James Potts
2006-04-27  5:24     ` R Hill
2006-04-28 15:06       ` James Potts

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