Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 241084

Summary: net-misc/spread: C(XX)FLAGS are ignored (at src_configure/compile)
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: New packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 277241    
Bug Blocks:    

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-10-10 11:30:54 UTC
I don't know the build system for this program (and this is a generic bug template so I cannot tell you which program exactly is), but my tests shows that it's not respecting CFLAGS (or CXXFLAGS) properly.

Please look into it, since it's important to respect user CFLAGS and CXXFLAGS.

Warning: this bug might look like a false positive because you actually have your CFLAGS being used; this happens if the CFLAGS are "set in stone" in the build system during src_unpack/src_prepare. While QA has not as of this moment expressed to me a preference, I'd sincerely suggest to avoid the set-in-stone approach, so that ebuild commands could work to reproduce the actual results.

To avoid the set in stone approach:

- consider just changing CFLAGS= to CFLAGS+= if the build system enables warnings;
- if the buildsystem does not use CFLAGS variable at all, in the sed use '$(CFLAGS)', single quoted, so that the CFLAGS variable is picked up;
- use '$(OPTCFLAGS)' in the sed and then use make OPTCFLAGS=$CFLAGS.

Thanks,
Diego
Comment 1 Christopher Friedt 2009-07-09 19:37:13 UTC
Someone with sufficient privileges will have to change this bug to depend on #277241, where I have included a patch to fix the undetected CFLAGS / LDFLAGS, as well as fix cross-compile issues.
Comment 2 Pacho Ramos gentoo-dev 2012-02-26 12:26:56 UTC
4.1.0 looks to respect them:

Spread has been configured with the following options:
                         User binaries: /usr/bin
                       System binaries: /usr/sbin
                   Configuration files: /etc
                        User libraries: /usr/lib64
                 Shared Spread Library: libspread.so
            Shared Spread Core Library: libspread-core.so
Shared Thread-safe Spread Core Library: libtspread-core.so
                          Header files: /usr/include
                          Manual pages: /usr/share/man/manX
                         Documentation: /usr/share/doc/spread
                              PID file: /var/run
                        Manpage format: doc

              Host: x86_64-pc-linux-gnu
          Compiler: x86_64-pc-linux-gnu-gcc
    Compiler flags: -O2 -pipe -march=native -Wall
Preprocessor flags: 
      Linker flags: -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu
         Libraries: -lm -lrt -lnsl