Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 383975 - app-emulation/xen-tools-4.1.2-r2[custom-cflags] does not respect "-O?"
Summary: app-emulation/xen-tools-4.1.2-r2[custom-cflags] does not respect "-O?"
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ian Delaney (RETIRED)
URL:
Whiteboard:
Keywords:
: 384363 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-21 16:13 UTC by Agostino Sarubbo
Modified: 2013-02-24 10:43 UTC (History)
2 users (show)

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


Attachments
revised patch (xen-tools-3.4.2-fix-CFLAGS.patch,27.70 KB, patch)
2011-09-26 15:40 UTC, Ian Delaney (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2011-09-21 16:13:08 UTC
gcc  -march=native -O2 -g0 -fno-strict-overflow -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .subdirs-all.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .subdir-all-xenstore.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .xenstore_client.o.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -Werror -I. -I../../tools/libxc -I../../tools/include -c -o xenstore_client.o xenstore_client.c

The other -O2 overwrites my conf. So also other flags should be dropped
Comment 1 Tony Vroon (RETIRED) gentoo-dev 2011-09-25 19:44:52 UTC
+*xen-tools-3.4.2-r4 (25 Sep 2011)
+
+  25 Sep 2011; Tony Vroon <chainsaw@gentoo.org> +xen-tools-3.4.2-r4.ebuild,
+  +files/xen-tools-3.4.2-remove-default-cflags.patch:
+  Proxy commit for Ian "idella4" Delaney. Be more thorough for custom-cflags
+  and use a diff instead of sed magic, closes bug #383975. Use toolchain-funcs
+  to invoke correct compiler, closes bug #383973.
Comment 2 Agostino Sarubbo gentoo-dev 2011-09-25 22:25:04 UTC
Not fixex :/


x86_64-pc-linux-gnu-gcc  -march=native -O2 -g0 -fno-strict-overflow -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .subdirs-all.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .subdir-all-libxc.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .build.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I../../xen/common/libelf -Wmissing-prototypes  -I. -I../xenstore -I../include -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .xc_core.o.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I../../xen/common/libelf -Wmissing-prototypes  -I. -I../xenstore -I../include -c -o xc_core.o xc_core.c
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2011-09-26 15:40:11 UTC
Created attachment 287799 [details, diff]
revised patch

Captures -O1 and all -g
Comment 4 Ian Delaney (RETIRED) gentoo-dev 2011-09-26 16:15:45 UTC
This may be over zealous.  Yet to know
archtester work # grep xc_core.c ../temp/build.log 
x86_64-pc-linux-gnu-gcc  -march=native -pipe -O3 -fno-strict-overflow -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .subdirs-all.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .subdir-all-libxc.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .build.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I../../xen/common/libelf -Wmissing-prototypes  -I. -I../xenstore -I../include -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .xc_core.o.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I../../xen/common/libelf -Wmissing-prototypes  -I. -I../xenstore -I../include -c -o xc_core.o xc_core.c
Comment 5 Agostino Sarubbo gentoo-dev 2011-09-26 16:34:39 UTC
ok, the last patch works for me.

@xen, please bump and mark as resolved fixed
Comment 6 Ian Delaney (RETIRED) gentoo-dev 2011-09-27 09:40:35 UTC
*** Bug 384363 has been marked as a duplicate of this bug. ***
Comment 7 Agostino Sarubbo gentoo-dev 2012-03-02 10:27:38 UTC
It happens again:


x86_64-pc-linux-gnu-gcc  -O2 -pipe -g0 -fno-strict-overflow -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .subdirs-all.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .subdir-all-console.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .main.o.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -Werror -I/var/tmp/portage/app-emulation/xen-tools-4.1.2-r2/work/xen-4.1.2/tools/console/../../tools/libxc -I/var/tmp/portage/app-emulation/xen-tools-4.1.2-r2/work/xen-4.1.2/tools/console/../../tools/include -I/var/tmp/portage/app-emulation/xen-tools-4.1.2-r2/work/xen-4.1.2/tools/console/../../tools/xenstore -I/var/tmp/portage/app-emulation/xen-tools-4.1.2-r2/work/xen-4.1.2/tools/console/../../tools/include -c -o daemon/main.o daemon/main.c
Comment 8 Ian Delaney (RETIRED) gentoo-dev 2012-03-02 15:27:06 UTC
This 
        find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
                -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
                -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
                -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
                -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
                -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
                -i {} \; || die "failed to re-set custom-cflags"

is already long in place to address the default custom-cflags.  The last patch was brutal and considered an imposition on the upstream's settings.  This will go to a higher level.
Comment 9 Ian Delaney (RETIRED) gentoo-dev 2013-02-24 10:43:49 UTC
dropped from portage