Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 399055 - flag-o-matic.eclass could not handle append-cflags "-DFOO='bar baz'"
Summary: flag-o-matic.eclass could not handle append-cflags "-DFOO='bar baz'"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-16 10:45 UTC by Justin Lecher (RETIRED)
Modified: 2012-01-16 20:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lecher (RETIRED) gentoo-dev 2012-01-16 10:45:43 UTC
Following commit
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.156&r2=1.157

seriously broke append-cflags if "-DFOO='bar baz'" should be added. This breaks at least one program for me and that backwards to stable versions. Please fix this as soon as possible. Here a debug ouput from an ebuild

+ append-cflags '-DINTEGER='\''long long int'\'''
+ [[ 1 -eq 0 ]]
++ test-flags-CC -xAVX -gcc -O3 -openmp '-DINTEGER='\''long long int'\'''
++ test-flags-PROG CC -xAVX -gcc -O3 -openmp '-DINTEGER='\''long long int'\'''
++ local comp=CC
++ local flags
++ local x
++ shift
++ [[ -z CC ]]
++ for x in '"$@"'
++ test-flag-CC -xAVX
++ test-flag-PROG CC -xAVX
++ local comp=CC
++ local flags=-xAVX
++ [[ -z CC ]]
++ [[ -z -xAVX ]]
+++ tc-getCC
+++ tc-getPROG CC gcc
+++ _tc-getPROG CHOST CC gcc
+++ local tuple=CHOST
+++ local v var vars=CC
+++ local prog=gcc
+++ var=CC
+++ for v in '${vars}'
+++ [[ -n icc ]]
+++ export CC=icc
+++ CC=icc
+++ echo icc
+++ return 0
++ local PROG=icc
++ icc -xAVX -c -o /dev/null -xc /dev/null
++ flags=-xAVX
++ for x in '"$@"'
++ test-flag-CC -gcc
++ test-flag-PROG CC -gcc
++ local comp=CC
++ local flags=-gcc
++ [[ -z CC ]]
++ [[ -z -gcc ]]
+++ tc-getCC
+++ tc-getPROG CC gcc
+++ _tc-getPROG CHOST CC gcc
+++ local tuple=CHOST
+++ local v var vars=CC
+++ local prog=gcc
+++ var=CC
+++ for v in '${vars}'
+++ [[ -n icc ]]
+++ export CC=icc
+++ CC=icc
+++ echo icc
+++ return 0
++ local PROG=icc
++ icc -gcc -c -o /dev/null -xc /dev/null
++ flags='-xAVX -gcc'
++ for x in '"$@"'
++ test-flag-CC -O3
++ test-flag-PROG CC -O3
++ local comp=CC
++ local flags=-O3
++ [[ -z CC ]]
++ [[ -z -O3 ]]
+++ tc-getCC
+++ tc-getPROG CC gcc
+++ _tc-getPROG CHOST CC gcc
+++ local tuple=CHOST
+++ local v var vars=CC
+++ local prog=gcc
+++ var=CC
+++ for v in '${vars}'
+++ [[ -n icc ]]
+++ export CC=icc
+++ CC=icc
+++ echo icc
+++ return 0
++ local PROG=icc
++ icc -O3 -c -o /dev/null -xc /dev/null
++ flags='-xAVX -gcc -O3'
++ for x in '"$@"'
++ test-flag-CC -openmp
++ test-flag-PROG CC -openmp
++ local comp=CC
++ local flags=-openmp
++ [[ -z CC ]]
++ [[ -z -openmp ]]
+++ tc-getCC
+++ tc-getPROG CC gcc
+++ _tc-getPROG CHOST CC gcc
+++ local tuple=CHOST
+++ local v var vars=CC
+++ local prog=gcc
+++ var=CC
+++ for v in '${vars}'
+++ [[ -n icc ]]
+++ export CC=icc
+++ CC=icc
+++ echo icc
+++ return 0
++ local PROG=icc
++ icc -openmp -c -o /dev/null -xc /dev/null
++ flags='-xAVX -gcc -O3 -openmp'
++ for x in '"$@"'
++ test-flag-CC '-DINTEGER='\''long long int'\'''
++ test-flag-PROG CC '-DINTEGER='\''long long int'\'''
++ local comp=CC
++ local 'flags=-DINTEGER='\''long long int'\'''
++ [[ -z CC ]]
++ [[ -z -DINTEGER='long long int' ]]
+++ tc-getCC
+++ tc-getPROG CC gcc
+++ _tc-getPROG CHOST CC gcc
+++ local tuple=CHOST
+++ local v var vars=CC
+++ local prog=gcc
+++ var=CC
+++ for v in '${vars}'
+++ [[ -n icc ]]
+++ export CC=icc
+++ CC=icc
+++ echo icc
+++ return 0
++ local PROG=icc
++ icc '-DINTEGER='\''long' long 'int'\''' -c -o /dev/null -xc /dev/null
++ echo '-xAVX -gcc -O3 -openmp'
++ [[ -n -xAVX -gcc -O3 -openmp ]]
+ export 'CFLAGS=-xAVX -gcc -O3 -openmp'
+ CFLAGS='-xAVX -gcc -O3 -openmp'
+ return 0
+ append-cflags '-DINTEGER='\''long long int'\'''
+ [[ 1 -eq 0 ]]
++ test-flags-CC -xAVX -gcc -O3 -openmp '-DINTEGER='\''long long int'\'''
++ test-flags-PROG CC -xAVX -gcc -O3 -openmp '-DINTEGER='\''long long int'\'''
++ local comp=CC
++ local flags
++ local x
++ shift
++ [[ -z CC ]]
++ for x in '"$@"'
++ test-flag-CC -xAVX
++ test-flag-PROG CC -xAVX
++ local comp=CC
++ local flags=-xAVX
++ [[ -z CC ]]
++ [[ -z -xAVX ]]
+++ tc-getCC
+++ tc-getPROG CC gcc
+++ _tc-getPROG CHOST CC gcc
+++ local tuple=CHOST
+++ local v var vars=CC
+++ local prog=gcc
+++ var=CC
+++ for v in '${vars}'
+++ [[ -n icc ]]
+++ export CC=icc
+++ CC=icc
+++ echo icc
+++ return 0
++ local PROG=icc
++ icc -xAVX -c -o /dev/null -xc /dev/null
++ flags=-xAVX
++ for x in '"$@"'
++ test-flag-CC -gcc
++ test-flag-PROG CC -gcc
++ local comp=CC
++ local flags=-gcc
++ [[ -z CC ]]
++ [[ -z -gcc ]]
+++ tc-getCC
+++ tc-getPROG CC gcc
+++ _tc-getPROG CHOST CC gcc
+++ local tuple=CHOST
+++ local v var vars=CC
+++ local prog=gcc
+++ var=CC
+++ for v in '${vars}'
+++ [[ -n icc ]]
+++ export CC=icc
+++ CC=icc
+++ echo icc
+++ return 0
++ local PROG=icc
++ icc -gcc -c -o /dev/null -xc /dev/null
++ flags='-xAVX -gcc'
++ for x in '"$@"'
++ test-flag-CC -O3
++ test-flag-PROG CC -O3
++ local comp=CC
++ local flags=-O3
++ [[ -z CC ]]
++ [[ -z -O3 ]]
+++ tc-getCC
+++ tc-getPROG CC gcc
+++ _tc-getPROG CHOST CC gcc
+++ local tuple=CHOST
+++ local v var vars=CC
+++ local prog=gcc
+++ var=CC
+++ for v in '${vars}'
+++ [[ -n icc ]]
+++ export CC=icc
+++ CC=icc
+++ echo icc
+++ return 0
++ local PROG=icc
++ icc -O3 -c -o /dev/null -xc /dev/null
++ flags='-xAVX -gcc -O3'
++ for x in '"$@"'
++ test-flag-CC -openmp
++ test-flag-PROG CC -openmp
++ local comp=CC
++ local flags=-openmp
++ [[ -z CC ]]
++ [[ -z -openmp ]]
+++ tc-getCC
+++ tc-getPROG CC gcc
+++ _tc-getPROG CHOST CC gcc
+++ local tuple=CHOST
+++ local v var vars=CC
+++ local prog=gcc
+++ var=CC
+++ for v in '${vars}'
+++ [[ -n icc ]]
+++ export CC=icc
+++ CC=icc
+++ echo icc
+++ return 0
++ local PROG=icc
++ icc -openmp -c -o /dev/null -xc /dev/null
++ flags='-xAVX -gcc -O3 -openmp'
++ for x in '"$@"'
++ test-flag-CC '-DINTEGER='\''long long int'\'''
++ test-flag-PROG CC '-DINTEGER='\''long long int'\'''
++ local comp=CC
++ local 'flags=-DINTEGER='\''long long int'\'''
++ [[ -z CC ]]
++ [[ -z -DINTEGER='long long int' ]]
+++ tc-getCC
+++ tc-getPROG CC gcc
+++ _tc-getPROG CHOST CC gcc
+++ local tuple=CHOST
+++ local v var vars=CC
+++ local prog=gcc
+++ var=CC
+++ for v in '${vars}'
+++ [[ -n icc ]]
+++ export CC=icc
+++ CC=icc
+++ echo icc
+++ return 0
++ local PROG=icc
++ icc '-DINTEGER='\''long' long 'int'\''' -c -o /dev/null -xc /dev/null
++ echo '-xAVX -gcc -O3 -openmp'
++ [[ -n -xAVX -gcc -O3 -openmp ]]
+ export 'CFLAGS=-xAVX -gcc -O3 -openmp'
+ CFLAGS='-xAVX -gcc -O3 -openmp'
+ return 0
Comment 1 SpanKY gentoo-dev 2012-01-16 19:48:44 UTC
considering the change was made months ago w/out too much complaint since, i doubt the "criticalness" of this

`append-cflags` with -D/-I/etc... is also generally wrong.  that's what append-cppflags is for.