[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Default ISA/tuning flags for GCC, --enable-kernel= level for glibc



Hi!

dist-f11-gcc44 currently has gcc 4.4.0-0.X packages, which are almost ready
for moving into dist-f11, but before doing that, I'd like to discuss
defaults.  gcc on most arches has a switch to select which ISA it can assume
(i.e. what minimum CPU will gcc compiled code run on) and a separate option
to tune for the same or other CPU.  Currently in Fedora the tuning is
I believe:
		ISA		 tuning
i386		-march=i386	 -mtune=generic
x86_64		-march=x86-64	 -mtune=generic
ppc		lowest		 -mtune=power6
ppc64		lowest		 -mtune=power6
s390		-march=g5	 -mtune=z9-109
s390x		-march=z900	 -mtune=z9-109
ia64		lowest		 -mtune=itanium2
sparc		-mcpu=v7	 -mtune=v7
sparcv9		-mcpu=v7	 -mtune=v7
sparc64		-mcpu=ultrasparc -mtune=ultrasparc

plus redhat-rpm-config tweaks something (-fasynchronous-unwind-tables
and -mminimal-toc tweaking should IMHO remain in redhat-rpm-config):
i686		-march=i686	 -mtune=generic
sparc		-mcpu=v7	 -mtune=ultrasparc
sparcv9		-mcpu=ultrasparc -mtune=ultrasparc

The question is, do we want to change anything on this for F11?
E.g. I believe Fedora hasn't shipped an i386 or i486 kernel for years,
and especially the -march=i386 vs. -march=i486 difference is significant
(-march=i386 doesn't have sufficient atomic instructions).  The only
-lpthread library we are using is NPTL and that doesn't support i386
anyway, so I think we should either use -march=i486 or -march=i586
(the latter has 8 byte compare and swap instruction) as the default,
when -march= isn't specified.
Similarly, I wonder what CPUs we want to support in Fedora for PowerPC,
if e.g. -march=power4 default wouldn't be possible.  On s390, is somebody
running Fedora on some 31-bit hw still (G5/G6), or could we safely default to
-march=z900 for -m31 as well and say -mtune=z10?  On sparc I guess
we could just -mcpu=ultrasparc -mtune=ultrasparc always, given that the
32-bit support is being dropped.

Another question is if we finally could bump the minimum supported kernel
version in Fedora 11 glibc.  Currently Fedora 10 glibc requires 2.6.9 or
later kernel, which means it can't assume a lot of stuff (e.g. private
futexes, a lot of added syscalls etc.), which means it has to test for them
at runtime of every program (e.g. every threaded program does a dummy futex
syscall to check for private futexes, for futex realtime clock support and
has to use variables for this, instead of oring constants in the mutexes
etc., and glibc has to check for ENOSYS and have fallbacks compiled in).
2.6.9 default comes I think still from the RHEL4 kernels.
Could we bump this ideally to 2.6.29?  It would mean Fedora 11 userland
only runs on 2.6.29 and later kernels, but we could gain speed and decrease
size of glibc shared libraries.

For the -march/-mcpu default changes, I think nothing is required from the
koji build infrastructure (I don't think there are 31-bit mainframes
around in koji/brew and I don't think there are 32-bit powerpcs or
i386/i486s among the build boxes either), on the other side that decision
has to be made almost immediately (before the world is rebuilt with gcc
4.4.0).

For glibc --enable-kernel= default this requires that all koji build boxes
and anything else that needs to run Fedora 11 binaries runs at least 2.6.29
kernels, but the change might be still delayed for a few weeks.

	Jakub


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]