Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 308145 - sys-devel/llvm-2.6 and sys-devel/clang-2.6-r1 prepends -O3 -fomit-framepointer to CFLAGS
Summary: sys-devel/llvm-2.6 and sys-devel/clang-2.6-r1 prepends -O3 -fomit-framepointe...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-07 02:24 UTC by Richard
Modified: 2011-10-03 19:50 UTC (History)
0 users

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 Richard 2010-03-07 02:24:37 UTC
When emerging clang, I noticed the following in the console output:

llvm[3]: Compiling CloneTrace.cpp for Release-Asserts build 
if i686-pc-linux-gnu-g++ -I/var/tmp/portage/sys-devel/clang-2.6-r1/work/llvm-2.6/include -I/var/tmp/portage/sys-devel/clang-2.6-r1/work/llvm-2.6/lib/Transforms/Utils  -DNDEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3 -fomit-frame-pointer -fno-exceptions -fPIC -Woverloaded-virtual -O2 -march=prescott -pipe -fomit-frame-pointer -floop-interchange -floop-strip-mine -floop-block   -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings  -c -MMD -MP -MF "/var/tmp/portage/sys-devel/clang-2.6-r1/work/llvm-2.6/lib/Transforms/Utils/Release-Asserts/CloneTrace.d.tmp" -MT "/var/tmp/portage/sys-devel/clang-2.6-r1/work/llvm-2.6/lib/Transforms/Utils/Release-Asserts/CloneTrace.o" -MT "/var/tmp/portage/sys-devel/clang-2.6-r1/work/llvm-2.6/lib/Transforms/Utils/Release-Asserts/CloneTrace.d" CloneTrace.cpp -o /var/tmp/portage/sys-devel/clang-2.6-r1/work/llvm-2.6/lib/Transforms/Utils/Release-Asserts/CloneTrace.o ; \
                then /bin/mv -f "/var/tmp/portage/sys-devel/clang-2.6-r1/work/llvm-2.6/lib/Transforms/Utils/Release-Asserts/CloneTrace.d.tmp" "/var/tmp/portage/sys-devel/clang-2.6-r1/work/llvm-2.6/lib/Transforms/Utils/Release-Asserts/CloneTrace.d"; else /bin/rm "/var/tmp/portage/sys-devel/clang-2.6-r1/work/llvm-2.6/lib/Transforms/Utils/Release-Asserts/CloneTrace.d.tmp"; exit 1; fi

It seems that clang is prepending -O3 -fomit-framepointer to the CFLAGS. While this does not cause an issue on my system, it should be attempting to downgrade my CFLAG choices, not upgrade them. Also, -fomit-framepointer hurts debugging on x86 systems, so it should not be added unless it is present in the system CFLAGS.

Reproducible: Always




$ emerge --info                                                      
Portage 2.1.8.1 (default/linux/x86/10.0, gcc-4.4.3, glibc-2.11-r1, 2.6.33 i686)        
=================================================================                      
System uname: Linux-2.6.33-i686-Genuine_Intel-R-_CPU_T2400_@_1.83GHz-with-gentoo-2.0.1 
Timestamp of tree: Sat, 06 Mar 2010 14:00:24 +0000                                     
ccache version 2.4 [enabled]                                                           
app-shells/bash:     4.1_p2                                                            
dev-java/java-config: 2.1.10                                                           
dev-lang/python:     2.6.4-r1, 3.1.1-r1                                                
dev-util/ccache:     2.4-r8                                                            
dev-util/cmake:      2.8.0-r2                                                          
sys-apps/baselayout: 2.0.1                                                             
sys-apps/openrc:     0.6.0-r1                                                          
sys-apps/sandbox:    2.2                                                               
sys-devel/autoconf:  2.13, 2.65                                                        
sys-devel/automake:  1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1                                
sys-devel/binutils:  2.20-r1                                                           
sys-devel/gcc:       4.4.3                                                             
sys-devel/gcc-config: 1.4.1                                                            
sys-devel/libtool:   2.2.6b                                                            
virtual/os-headers:  2.6.32
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer -floop-interchange -floop-strip-mine -floop-block"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer -floop-interchange -floop-strip-mine -floop-block"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests buildpkg ccache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://gentoo.netnitco.net http://distro.ibiblio.org/pub/linux/distributions/gentoo/"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/vmware"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa apm berkdb bzip2 cdr cli consolekit cracklib crypt cups cxx dbus dri dvd dvdr fftw fortran gd gdbm gif gnutls gpm hal iconv ipv6 java java6 jpeg kde lzma midi mmap mmx mng modules mudflap ncurses nls nptl nptlonly nsplugin opengl openmp pam pcre perl png pppd python qt3support qt4 readline reflection samba session spl sqlite sse sse2 sse3 ssl svg sysfs tcpd threads tiff unicode x86 xml xorg xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" NETBEANS_MODULES="*" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Bernard Cafarelli gentoo-dev 2010-03-18 19:34:25 UTC
Thanks for the report!

This comes from llvm makefiles (which in turn also has this problem), I have just fixed llvm in tree (as 2.6-r1 revision bump), now looking at clang
Comment 2 Bernard Cafarelli gentoo-dev 2010-03-18 21:34:20 UTC
And fixed for clang in 2.6-r2, with the same patch, so everything done here :)