Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 252677 - =sys-devel/gcc-4.3.2* fails to build on alpha without nopie USE-flag
Summary: =sys-devel/gcc-4.3.2* fails to build on alpha without nopie USE-flag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: Alpha Linux
: High normal (vote)
Assignee: Alpha Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-27 12:17 UTC by Raúl Porcel (RETIRED)
Modified: 2008-12-29 20:39 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,498.69 KB, text/plain)
2008-12-27 12:18 UTC, Raúl Porcel (RETIRED)
Details
config.log (config.log,11.69 KB, text/plain)
2008-12-27 14:11 UTC, Raúl Porcel (RETIRED)
Details
fix a typo on the alpha/elf.h file (10_all_gcc-4.4-gen-crt-start-endfile.patch,7.76 KB, text/plain)
2008-12-29 15:30 UTC, Magnus Granberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raúl Porcel (RETIRED) gentoo-dev 2008-12-27 12:17:01 UTC
Portage 2.1.6.3 (default/linux/alpha/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r0, 2.6.27.7 alpha)
=================================================================
System uname: Linux-2.6.27.7-alpha-EV68AL-with-glibc2.0
Timestamp of tree: Sat, 27 Dec 2008 10:15:01 +0000
app-shells/bash:     3.2_p48
dev-lang/python:     2.5.2-r8
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.1
sys-apps/sandbox:    1.3.2
sys-devel/autoconf:  2.63
sys-devel/automake:  1.10.2
sys-devel/binutils:  2.19
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="alpha ~alpha"
CBUILD="alpha-unknown-linux-gnu"
CFLAGS="-mieee -pipe -O2"
CHOST="alpha-unknown-linux-gnu"
CONFIG_PROTECT="/etc/dispatch-conf.conf /etc/make.conf /etc/portage"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-mieee -pipe -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg cleanpkgdir distclean distlocks fixpackages genpkgindex parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://pandemonium.tiscali.de/pub/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://gentoo.mirror.solnet.ch"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j5"
PKGDIR="/packages/"
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"
SYNC="rsync://rsync5.de.gentoo.org/gentoo-portage"
USE="acl alpha berkdb bindist bzip2 cli cracklib crypt cups dlloader dri fortran gdbm gpm iconv ipv6 isdnlog midi mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl sysfs tcpd unicode xorg zlib" ALSA_CARDS="ali5451 als4000 bt87x ca0106 cmipci emu10k1 ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 maestro3 trident usb-audio via82xx 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint mach64 mga nv r128 radeon savage tdfx vga voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

-------------------

monolith gcc # emerge -pv gcc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-devel/gcc-4.3.2-r1  USE="fortran mudflap nls openmp (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -gtk (-hardened) -ip28 -ip32r10k -libffi (-multilib) -multislot (-n32) (-n64) -nocxx -nopie* -objc -objc++ -objc-gc -test -vanilla" 0 kB

If i build it with USE="nopie" it compiles fine.

I'll attach the build log
Comment 1 Raúl Porcel (RETIRED) gentoo-dev 2008-12-27 12:18:05 UTC
Created attachment 176501 [details]
build.log
Comment 2 Raúl Porcel (RETIRED) gentoo-dev 2008-12-27 14:11:34 UTC
Created attachment 176508 [details]
config.log

This is the mentioned config.log
Comment 3 SpanKY gentoo-dev 2008-12-27 20:15:09 UTC
i can reproduce this, but only natively.  cross-compiler works fine ...
Comment 4 Magnus Granberg gentoo-dev 2008-12-27 22:00:55 UTC
Can we commet the PIE_VER and PIE_GCC and wait when solar come back?
Solar and I need to fix some stuff in the eclass to get it working.
And I don't have any alpha to test with :(
Comment 5 Magnus Granberg gentoo-dev 2008-12-27 22:36:31 UTC
see 10_all_gcc-4.4-gen_crt_start_endfile.patch
CRTFILE alpha %{!shared: %{pg|p:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}
and we have %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s} }
will that have any thing to do with it?

any on the alpha team 
change this and try
gcc.c
#define CRTFILE_GEN_SPEC "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}}"
to
#define CRTFILE_GEN_SPEC "%{!shared: %{pg|p:gcrt1.o%s;:crt1.o%s}}"
and 
#define CRTFILE_PIE_GEN_SPEC "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s} }"
to
#define CRTFILE_PIE_GEN_SPEC "%{!shared: %{pg|p:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s} }"
 
Comment 6 SpanKY gentoo-dev 2008-12-29 11:28:59 UTC
pie patches need to be completely impotent by default.  in other words, the behavior and output of gcc when SPLIT_SPECS=false needs to be exactly the same as if the pie patches werent applied.  even when SPLIT_SPECS=true, the "vanilla" specs must behave the same.

ive looked through the pie patchset and it seems fairly benign, so i imagine there's a minor typo or something silly going on.

ive also seen a segfault while building gcc-4.3.2-r1 on superh ... i'm rebuilding gcc-4.3.2 (with PIE patches disabled) as 4.3.2-r0 is working otherwise ...
Comment 7 SpanKY gentoo-dev 2008-12-29 12:31:03 UTC
simply reverting the changes to gcc/config/alpha/elf.h seems to fix the segv ...
Comment 8 Magnus Granberg gentoo-dev 2008-12-29 13:37:13 UTC
Doing soem test on a aplpha now
Hope it gos well
so it something with the crt start end files.
a quick fix is to remove the alpha part of the patch
and add it later when we have fixed?

Comment 9 Magnus Granberg gentoo-dev 2008-12-29 15:30:22 UTC
Created attachment 176760 [details]
fix a typo on the alpha/elf.h file

-#define STARTFILE_SPEC "%(ld_pie_crtfile_gen) crti.o%s %(startfile_t_pie_gen)"
+#define STARTFILE_SPEC "%(ld_pie_crtfile_gen) crti.o%s %(startfile_pie_t_gen)"

happy testing
Comment 10 Magnus Granberg gentoo-dev 2008-12-29 17:10:54 UTC
Thanx for the help armin76