Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 173527 - app-misc/portage-utils-0.1.25 -Os compile time warnings
Summary: app-misc/portage-utils-0.1.25 -Os compile time warnings
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Portage Utils Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2007-04-06 02:51 UTC by Doug Goldstein (RETIRED)
Modified: 2009-03-15 10:15 UTC (History)
0 users

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


Attachments
kill_-Os_inlining_warnings.patch (kill_-Os_inlining_warnings.patch,1.57 KB, patch)
2007-04-06 19:44 UTC, TGL
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Goldstein (RETIRED) gentoo-dev 2007-04-06 02:51:48 UTC
qfile.c: In function 'prepare_qfile_args':
qfile.c:39: warning: inlining failed in call to 'qfile_is_prefix': --param max-inline-insns-single limit reached
qfile.c:409: warning: called from here
qfile.c:39: warning: inlining failed in call to 'qfile_is_prefix': --param max-inline-insns-single limit reached
qfile.c:428: warning: called from here
qcache.c: In function 'qcache_read_lines':
qcache.c:235: warning: inlining failed in call to 'qcache_count_lines': --param max-inline-insns-single limit reached
qcache.c:271: warning: called from here
qfile.c: In function 'qfile':
qfile.c:39: warning: inlining failed in call to 'qfile_is_prefix': --param max-inline-insns-single limit reached
qfile.c:199: warning: called from here

$ emerge --info
Portage 2.1.2.3 (default-linux/x86/2006.1/desktop, gcc-4.1.2, glibc-2.5-r1, 2.6.20-gentoo i686)
=================================================================
System uname: 2.6.20-gentoo i686 Intel(R) Pentium(R) M processor 1.80GHz
Gentoo Base System release 1.12.10
Timestamp of tree: Fri, 06 Apr 2007 02:30:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.31-r5
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.15-r1
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.20-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=pentium-m -pipe -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-Os -march=pentium-m -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache cvs distlocks metadata-transfer sandbox sfperms sign splitdebug strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,--as-needed"
MAKEOPTS="-l 2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/cardoe/workspace/gentopia/overlay /home/cardoe/workspace/gnome"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acpi alsa avahi bash-completion berkdb bitmap-fonts bzip2 cairo cdr cli cracklib crypt cups dbus dmi dri dts dvd dvdr encode exif fam firefox gdbm gif glitz gnome gstreamer gtk hal howl iconv ipv6 isdnlog jpeg lcms libg++ libnotify live mad midi mjpeg mmx mono mp3 mpeg mythtv ncurses nptl nptlonly oav ogg opengl pam pcre pdf perl png pppd python qt3 quicktime readline reflection samba sdl session spell sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode vorbis win32codecs x86 xcb xml xorg xv xvid zlib" ALSA_CARDS="intel8x0" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LIRC_DEVICES="mceusb2" USERLAND="GNU" VIDEO_CARDS="radeon ati"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 TGL 2007-04-06 19:43:39 UTC
The problem is related to the -Os flag.  Here is what GCC does (gcc/opts.c):

  if (optimize_size)
    {
      /* Inlining of very small functions usually reduces total size.  */
      set_param_value ("max-inline-insns-single", 5);
      set_param_value ("max-inline-insns-auto", 5);
      flag_inline_functions = 1;

It means there is a 5 pseudo instructions limit for explicitly inlined functions (that's what max-inline-insns-single is about, see `man gcc`), which qfile_is_prefix() and qcache_count_lines() obviously outsteps.

I can think of the following options to kill this warnings:
 - qfile_is_prefix(), we could make it a macro. It's ugly, but we can't drop the inline keyword on this one, since it's used 3 times in the code and thus would not even be considered for inlining at -O2 (ie. when not using -finline-functions).
 - qcache_count_lines(), we could make it static instead of inline, because it's only used once, and thus should in theory fall under -finline-functions-called-once (which is enabled at any -Ox level).

I will attach a patch which does that.
Comment 2 TGL 2007-04-06 19:44:54 UTC
Created attachment 115601 [details, diff]
kill_-Os_inlining_warnings.patch
Comment 3 solar (RETIRED) gentoo-dev 2007-04-06 20:50:51 UTC
/var/cvsroot/gentoo-projects/portage-utils/qcache.c,v  <--  qcache.c
new revision: 1.23; previous revision: 1.22
/var/cvsroot/gentoo-projects/portage-utils/qfile.c,v  <--  qfile.c
new revision: 1.43; previous revision: 1.42