public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] new ebuild variables proposal...
@ 2002-04-05 17:04 Zach Forrest
  2002-04-05 18:45 ` George Shapovalov
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Zach Forrest @ 2002-04-05 17:04 UTC (permalink / raw
  To: gentoo-dev

I've been working on an ebuild recently and the package won't compile 
with the '-funroll-loops' compiler flag. It might be nice to have a 
couple of variables such as 'BAD_CFLAGS' and 'BAD_CXXFLAGS' that would 
tell portage to remove these compiler flags for a particular ebuild. 
This would provide a uniform way to deal with any similar problems 
without someone having to modify their optimization settings for one ebuild.

Any thoughts?

Zach



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

* Re: [gentoo-dev] new ebuild variables proposal...
  2002-04-05 17:04 [gentoo-dev] new ebuild variables proposal Zach Forrest
@ 2002-04-05 18:45 ` George Shapovalov
  2002-04-05 18:58 ` Spider
  2002-04-05 18:58 ` Jared H. Hudson
  2 siblings, 0 replies; 6+ messages in thread
From: George Shapovalov @ 2002-04-05 18:45 UTC (permalink / raw
  To: gentoo-dev

This is in fact possible and does not require new flag introguction. Just
define you CFLAGS in src_compile and pass them to make. You can easily to
redefine or add something to C[XX]Flags. If you want to only remove some
specific flags you will need to do some bash magic (though I am sure such
utils exist already, if not its a few lines of python code).
In the last case you indeed may want some automation on the side of
portage scripts. For details on how to do such CFLAGS modifications
just grep for CFLAGS under /usr/portage and read files which match.

If you want this to be seriously considered by core developers (since
this is a modification to portage) this is what you will need to do (from
my experience):
write more detailed proposal (not very long though) and spend some time on
motivations - why this is necessary. Then submit this onto bugs.gentoo.org
as a feature request (put it under: gentoo/portage/enhancement).


George


On Fri, 5 Apr 2002, Zach Forrest wrote:

> I've been working on an ebuild recently and the package won't compile
> with the '-funroll-loops' compiler flag. It might be nice to have a
> couple of variables such as 'BAD_CFLAGS' and 'BAD_CXXFLAGS' that would
> tell portage to remove these compiler flags for a particular ebuild.
> This would provide a uniform way to deal with any similar problems
> without someone having to modify their optimization settings for one ebuild.
>
> Any thoughts?
>
> Zach
>
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev
>



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

* Re: [gentoo-dev] new ebuild variables proposal...
  2002-04-05 17:04 [gentoo-dev] new ebuild variables proposal Zach Forrest
  2002-04-05 18:45 ` George Shapovalov
@ 2002-04-05 18:58 ` Spider
  2002-04-05 19:01   ` Bart Verwilst
  2002-04-05 18:58 ` Jared H. Hudson
  2 siblings, 1 reply; 6+ messages in thread
From: Spider @ 2002-04-05 18:58 UTC (permalink / raw
  To: gentoo-dev

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

try something like :
	CFLAGS=`echo CFLAGS | sed s:-funroll-loops::g`
//Spider

begin  quote
On Fri, 05 Apr 2002 09:04:37 -0800
Zach Forrest <zach@disinformation.ca> wrote:

> I've been working on an ebuild recently and the package won't compile 
> with the '-funroll-loops' compiler flag. It might be nice to have a 
> couple of variables such as 'BAD_CFLAGS' and 'BAD_CXXFLAGS' that would
> tell portage to remove these compiler flags for a particular ebuild. 
> This would provide a uniform way to deal with any similar problems 
> without someone having to modify their optimization settings for one
> ebuild.
> 
> Any thoughts?
> 
> Zach
> 
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev


--
begin  happy99.exe
This is a .signature virus! Please copy me into your .signature!
See Microsoft KB Article Q265230 for more information.
end

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

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

* Re: [gentoo-dev] new ebuild variables proposal...
  2002-04-05 17:04 [gentoo-dev] new ebuild variables proposal Zach Forrest
  2002-04-05 18:45 ` George Shapovalov
  2002-04-05 18:58 ` Spider
@ 2002-04-05 18:58 ` Jared H. Hudson
  2 siblings, 0 replies; 6+ messages in thread
From: Jared H. Hudson @ 2002-04-05 18:58 UTC (permalink / raw
  To: gentoo-dev

Most ebuilds for packages that are picky about optimization settings, set 
their own CFLAGS & CXXFLAGS. If you will post what package you tried to 
compile and could not due to a CFLAGS setting, it would help us.

For example, if you look at the glibc ebuild you will find that CFLAGS is 
set to -O2 instead of the possible default of -O3, because linuxthreads 
which is part of glibc won't compile with -O3 apparently.

Personally, I feel this is the right way to handle this. Otherwise, just
having a BAD_CFLAGS variable takes away optimizations from programs which 
might have a problem with 1 but not all optimization flags.

-Jared H.

On Fri, 5 Apr 2002, Zach Forrest wrote:

> I've been working on an ebuild recently and the package won't compile 
> with the '-funroll-loops' compiler flag. It might be nice to have a 
> couple of variables such as 'BAD_CFLAGS' and 'BAD_CXXFLAGS' that would 
> tell portage to remove these compiler flags for a particular ebuild. 
> This would provide a uniform way to deal with any similar problems 
> without someone having to modify their optimization settings for one ebuild.
> 
> Any thoughts?
> 
> Zach
> 
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev
> 

-- 
Using the internet as it was originally intended...
for the further research of pornography and pipebombs.



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

* Re: [gentoo-dev] new ebuild variables proposal...
  2002-04-05 18:58 ` Spider
@ 2002-04-05 19:01   ` Bart Verwilst
  2002-04-05 19:43     ` Spider
  0 siblings, 1 reply; 6+ messages in thread
From: Bart Verwilst @ 2002-04-05 19:01 UTC (permalink / raw
  To: gentoo-dev

Hi

Easiest and best way to do it IMHO:

CFLAGS=${CFLAGS/-funroll-loops}

See ya!

On Friday 05 April 2002 20:58, Spider wrote:
|| try something like :
|| 	CFLAGS=`echo CFLAGS | sed s:-funroll-loops::g`
|| //Spider
||
|| begin  quote
|| On Fri, 05 Apr 2002 09:04:37 -0800
||
|| Zach Forrest <zach@disinformation.ca> wrote:
|| > I've been working on an ebuild recently and the package won't compile
|| > with the '-funroll-loops' compiler flag. It might be nice to have a
|| > couple of variables such as 'BAD_CFLAGS' and 'BAD_CXXFLAGS' that would
|| > tell portage to remove these compiler flags for a particular ebuild.
|| > This would provide a uniform way to deal with any similar problems
|| > without someone having to modify their optimization settings for one
|| > ebuild.
|| >
|| > Any thoughts?
|| >
|| > Zach
|| >
|| > _______________________________________________
|| > gentoo-dev mailing list
|| > gentoo-dev@gentoo.org
|| > http://lists.gentoo.org/mailman/listinfo/gentoo-dev

-- 
Bart Verwilst
Gentoo Linux Developer, Desktop Team
Gent, Belgium


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

* Re: [gentoo-dev] new ebuild variables proposal...
  2002-04-05 19:01   ` Bart Verwilst
@ 2002-04-05 19:43     ` Spider
  0 siblings, 0 replies; 6+ messages in thread
From: Spider @ 2002-04-05 19:43 UTC (permalink / raw
  To: gentoo-dev

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

you win! : )



> Easiest and best way to do it IMHO:
> CFLAGS=${CFLAGS/-funroll-loops}
> || 	CFLAGS=`echo CFLAGS | sed s:-funroll-loops::g`

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

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

end of thread, other threads:[~2002-04-05 21:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-05 17:04 [gentoo-dev] new ebuild variables proposal Zach Forrest
2002-04-05 18:45 ` George Shapovalov
2002-04-05 18:58 ` Spider
2002-04-05 19:01   ` Bart Verwilst
2002-04-05 19:43     ` Spider
2002-04-05 18:58 ` Jared H. Hudson

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