Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
multiple -march=
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
krotuss
Tux's lil' helper
Tux's lil' helper


Joined: 01 Aug 2008
Posts: 89

PostPosted: Wed Aug 15, 2012 10:15 pm    Post subject: multiple -march= Reply with quote

Hi, I have noticed that some options are being passed multiple times to compiler during build.

Example:
Code:

i686-pc-linux-gnu-gcc -c -pipe -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -march=native -O2 -pipe -ggdb -march=native -O2 -pipe -ggdb -march=pentium4 -std=c99 -fomit-frame-pointer -fPIC -pthread -g -Wall -Wno-parentheses -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -DMMX -Di386 -D_GNU_SOURCE -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include -I/usr -I/usr/include/libxml2 -o dummy.o dummy.c


Note: -march=native; -march=pentium4

So questions are: Why does it happen? Is it normal or is something broken with my portage? Which march will get finally used? Thanks.
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 7610

PostPosted: Wed Aug 15, 2012 10:42 pm    Post subject: Reply with quote

When multiple -march are specified, the last match wins. What is the output of emerge --info?
Back to top
View user's profile Send private message
krotuss
Tux's lil' helper
Tux's lil' helper


Joined: 01 Aug 2008
Posts: 89

PostPosted: Wed Aug 15, 2012 10:48 pm    Post subject: Reply with quote

Code:

Portage 2.1.11.9 (default/linux/x86/10.0/desktop/kde, gcc-4.5.3, glibc-2.15-r2, 3.3.8-gentoo i686)
=================================================================
System uname: Linux-3.3.8-gentoo-i686-Intel-R-_Pentium-R-_4_CPU_2.80GHz-with-gentoo-2.1
Timestamp of tree: Wed, 15 Aug 2012 21:30:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.27
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo x-portage x-local
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/bind"
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.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/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="-march=native -O2 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"                                                                                                                                               
PKGDIR="/usr/portage/packages"                                                                                                                               
PORTAGE_CONFIGROOT="/"                                                                                                                                       
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"                                                                                                           
PORTAGE_TMPDIR="/var/tmp"                                                                                                                                   
PORTDIR="/usr/portage"                                                                                                                                       
PORTDIR_OVERLAY="/usr/local/portage /var/lib/layman/local"                                                                                                   
SYNC="rsync://rsync.gentoo.org/gentoo-portage"                                                                                                               
USE="X a52 aac acl acpi alsa bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative directfb dri dts dvd dvdr eds emboss encode evo exif fam fbcon firefox flac fortran gdbm gif gnome gpm gstreamer gtk iconv ipv6 java jpeg kde kipi lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap ncurses nls nptl ogg opengl openmp pam pango pcre pdf perl phonon plasma png policykit ppds pppd private-headers python qt3support qt4 readline samba sdl semantic-desktop session spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vaapi vdpau vorbis win32codecs wxwidgets x264 x86 xcb xcomposite xinerama xml xscreensaver xv xvid 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LIRC_DEVICES="serial userspace" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Back to top
View user's profile Send private message
krotuss
Tux's lil' helper
Tux's lil' helper


Joined: 01 Aug 2008
Posts: 89

PostPosted: Wed Aug 15, 2012 11:01 pm    Post subject: Reply with quote

I have just tried emerge bash and get
Code:

i686-pc-linux-gnu-gcc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"i686"' -DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"i686-pc-linux-gnu"' -DCONF_VENDOR='"pc"' -DLOCALEDIR='"/usr/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H   -I. -I./include -I. -I./include -I./lib  -DDEFAULT_PATH_VALUE='"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"' -DSTANDARD_UTILS_PATH='"/bin:/usr/bin:/sbin:/usr/sbin"' -DSYS_BASHRC='"/etc/bash/bashrc"' -DSYS_BASH_LOGOUT='"/etc/bash/bash_logout"' -DNON_INTERACTIVE_LOGIN_SHELLS -DSSH_SOURCE_BASHRC -march=native -O2 -pipe -ggdb -c bashline.c


while first snippet was from media-tv/mythtv-0.25.2_p20120716, maybe their configure script is broken and concats its own flags to system CFLAGS. I dont know about other packages yet, but I will keep eye on it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum