FS#2223 - GCC 3.4 + symbol visibility

Attached to Project: Arch Linux
Opened by Mircea Bardac (IceRAM) - Thursday, 17 February 2005, 17:31 GMT
Last edited by Tobias Powalowski (tpowa) - Thursday, 03 March 2005, 09:12 GMT
Task Type Feature Request
Category System
Status Closed
Assigned To Judd Vinet (judd)
Architecture not specified
Severity High
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

More info:
http://www.nedprod.com/programs/gccvisibility.html

---
ArchLinux Forum topic:
http://bbs.archlinux.org/viewtopic.php?p=68098

What I've understood from that webpage is that, in order to turn this on, the applications must be compiled with some certain flags (this provides GCC backward compatibility, even with this patch applied, IMO).

A comment here [http://www.osnews.com/comment.php?news_id=9737] states that KDE 3.4 (upcomming version) supports this compile flag and it's (a lot) faster.
I haven't seen the PKGBUILD of KDE 3.4 beta 2 to check if it uses "-fvisibilty=hidden", but I suppose it does not since GCC is not patched.

Fedora, MDK 10.2 and Gentoo have this patch applied to GCC 3.4 (and KDE 3.4 betas are compiled with fvisibility in those distros, according to the comments there.
---

Taken into account that this patch is already in GCC 4 and already addopted by major distributions (+ supported by upcoming KDE* version), I think it might be a good idea to have it in ArchLinux too.

KDE 3.4 users would be the first to actually gain something from this patch.

--
* which is known as a bloated DE, willing to do anything to gain speed
Closed by  Judd Vinet (judd)
Monday, 07 March 2005, 08:40 GMT
Reason for closing:  Implemented
Additional comments about closing:  Added in 3.4.3-2
Comment by Tobias Powalowski (tpowa) - Thursday, 03 March 2005, 08:21 GMT Comment by Tobias Powalowski (tpowa) - Thursday, 03 March 2005, 09:11 GMT
http://bugs.archlinux.org/index.php?do=details&id=2111
is the place where a new PKGBUILD is proposed for faster building.

please have a look at gcc soon, because kde 3.4 final is coming in 12 days and it would be great if we could take the advantage out of the new visibility function :)

JGC is compiling it, uploads the changes here as attachement and will upload it maybe to his home dir.
Comment by Mircea Bardac (IceRAM) - Thursday, 03 March 2005, 09:44 GMT
-- Note from the Forums Thread --
A quick search through the Gentoo forums showed KDE 3.4 being compiled with BOTH "-fvisibility-inlines-hidden" and "-fvisibilty=hidden".

And.. it seems many Gentoo users use both of the above flags as Global CFLAGS. If something doesn't work on compilation, they remove them (old-style application). I might have been wrong about "-fvisibility-inlines-hidden" being overridden by "-fvisibilty=hidden".
-- end --
Comment by Jan de Groot (JGC) - Thursday, 03 March 2005, 16:45 GMT
Attached is my suggested PKGBUILD and the patch. The libstdc++ is upgraded tio 3.3.5 and only libstdc++ is built, not the complete bootstrap procedure.
The sources are split up so we don't take in the extra languages (gcc-java, gcc-g77) in our download. This was suggested in task 2111
Comment by Judd Vinet (judd) - Thursday, 03 March 2005, 21:17 GMT
I get the following error when trying to build with your patch:

../../../gcc-3.4.3/libiberty/cplus-dem.c:55: error: conflicting types for 'malloc'
../../../gcc-3.4.3/libiberty/cplus-dem.c:55: error: conflicting types for 'malloc'
../../../gcc-3.4.3/libiberty/cplus-dem.c: In function `code_for_qualifier':
../../../gcc-3.4.3/libiberty/cplus-dem.c:630: warning: implicit declaration of function `abort'
../../../gcc-3.4.3/libiberty/cplus-dem.c: In function `squangle_mop_up':
../../../gcc-3.4.3/libiberty/cplus-dem.c:1154: warning: implicit declaration of function `free'
../../../gcc-3.4.3/libiberty/cplus-dem.c: In function `demangle_qualified':
../../../gcc-3.4.3/libiberty/cplus-dem.c:3310: warning: implicit declaration of function `atoi'
make[2]: *** [cplus-dem.o] Error 1
make[2]: Leaving directory `/home/jvinet/arch/build/base/gcc/src/gcc-build/i686-pc-linux-gnu/libiberty'
make[1]: *** [all-target-libiberty] Error 2
make[1]: Leaving directory `/home/jvinet/arch/build/base/gcc/src/gcc-build'
make: *** [bootstrap] Error 2
Comment by Mario Vazquez (darkcoder) - Friday, 04 March 2005, 21:00 GMT
I think the patch requires an update to the current 3.4.x branch
Comment by Tobias Powalowski (tpowa) - Saturday, 05 March 2005, 07:37 GMT
kde 3.4 autodetects the CFLAGS and use them if they are available.
Comment by Tobias Powalowski (tpowa) - Saturday, 05 March 2005, 09:24 GMT
judd your build box seems not to be ok.
for me JGC's PKGBUILD works like a charm :)

Loading...