Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 429526 - dev-libs/libev ignores user CFLAGS
Summary: dev-libs/libev ignores user CFLAGS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Yixun Lan
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-02 16:29 UTC by Petr Polezhaev
Modified: 2013-02-21 10:39 UTC (History)
1 user (show)

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


Attachments
Simple patch for configure.ac illustrating the issue (libev-4.11-configure.ac-respect-cflags-fix.patch,377 bytes, patch)
2012-08-02 16:40 UTC, Petr Polezhaev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Polezhaev 2012-08-02 16:29:49 UTC
Due to error in using autoconf, configure.ac replaces user-supplied CFLAGS with "default" ones.

Reproducible: Always

Steps to Reproduce:
1. ebuild libav-4.11.ebuild configure
2. grep -E '^CFLAGS = ' ${S}/Makefile
Actual Results:  
CFLAGS = -g -O3

Expected Results:  
CFLAGS = -O2 -pipe -march=native -mtune=native -floop-interchange -floop-strip-mine -floop-block -floop-parallelize-all -fgraphite-identity

Portage 2.2.0_alpha116-r1 (default/linux/amd64/10.0/desktop, gcc-4.6.3, glibc-2.15-r2, 3.5.0-gentoo-nord-4.0 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.5.0-gentoo-nord-4.0-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T6600_@_2.20GHz-with-gentoo-2.1
Timestamp of tree: Wed, 01 Aug 2012 22:45:01 +0000
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/cmake:           2.8.8-r3
dev-util/pkgconfig:       0.27
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.5, 1.12.2
sys-devel/binutils:       2.22.90
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.5 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo rion enlightenment-niifaq niifaq x11 gamerlay-stable seden perl-experimental java-overlay multilib local
Installed sets: @enlightenment-all
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -mtune=native -floop-interchange -floop-strip-mine -floop-block -floop-parallelize-all -fgraphite-identity"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native -mtune=native -floop-interchange -floop-strip-mine -floop-block -floop-parallelize-all -fgraphite-identity"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --jobs=2"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy config-protect-if-modified distlocks ebuild-locks fixlafiles force-multilib metadata-transfer news noinfo parallel-fetch parse-eapi-ebuild-head preserve-libs protect-owned sandbox sfperms split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,--as-needed -Wl,--sort-common -Wl,-O1 -Wl,--hash-style=gnu "
LINGUAS="ru"
MAKEOPTS="-j2"
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="/var/lib/layman/rion /var/lib/layman/enlightenment-niifaq /var/lib/layman/niifaq /var/lib/layman/x11 /var/lib/layman/gamerlay /var/lib/layman/seden /var/lib/layman/perl-experimental /var/lib/layman/java-overlay /var/lib/layman/multilib-portage /usr/local/portage"
SYNC="rsync://rsync.niifaq.ru/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm iconv idn ipv6 jpeg kerberos lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap ncurses nls nptl ogg opengl openmp pam pango pch pcre pdf png policykit ppds pppd qt3support qt4 readline sasl sdl session spell sse sse2 ssl ssse3 startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb vdpau vim vim-syntax vorbis wxwidgets x264 xcb xcomposite xinerama xml xv xvid zlib zsh-completion" ALSA_CARDS="hda-intel" 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="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="lvm gensplash" 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 synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru" MULTILIB_ABIS="amd64 x86" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby19 ruby18" SANE_BACKENDS="net" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

dev-libs/libev-4.11 was built with the following:
USE="-static-libs" MULTILIB_ABI="(amd64) (-x86)"
Comment 1 Petr Polezhaev 2012-08-02 16:40:06 UTC
Created attachment 320088 [details, diff]
Simple patch for configure.ac illustrating the issue

Doesn't apply with libav-ac.patch from tree.

Problem is: one should never place any code prior to AC_INIT - it just don't make it into configure. In Gentoo, I suppose, we may just completely remove this "default flags" hack.
Comment 2 Thomas Kahle (RETIRED) gentoo-dev 2013-02-19 13:51:52 UTC
Reassign due to proxy maintainership.
Comment 3 Yixun Lan archtester gentoo-dev 2013-02-20 07:29:49 UTC
your patch looks good to me, also I checked with upstream, they already accepted this fix with a very semilar patch.

about the "default flags" hack, although I agree, fallback to a default CFLAGS is useless for gentoo distro, but doesn't hurt here, and also for upstream this will has minimal impact.

thanks
 
(In reply to comment #1)
Comment 4 Thomas Kahle (RETIRED) gentoo-dev 2013-02-21 10:39:54 UTC
Should be fixed in -r1 by upstream's patch (which just moves the offending line until after AC_INIT).