Funny you asked. Does this commit
http://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0a85c487b7174b1d24fd794a4b18ccdca0eb9165
work for you? It is on hjl/x32/mx32 branch. You can try to
backport it to gcc 4.6.
--
H.J.
looks like it should. i'll give it a spin.
note, arm/mips seems to use --with-abi= to select the default abi ...
would be nice if we stayed consistent ...
-mike
I changed hjl/x32/mx32 branch to use --with-abi instead.
Thanks.
--
H.J.
I also backported it to hjl/x32/gcc-4_6-branch+mx32 branch.
--
H.J.
nice. i don't suppose we could also have --with-abi take the same
argument style as --with-multilib-list ? it's a bit awkward to use
"m64 m32 mx32" for --with-multilib-list, but --with-abi takes "64 32
x32".
-mike
--with-abi for other targets doesn't have "m".
--
H.J.
true, but there aren't any ports atm that accept both --with-abi and
--with-multilib-list which we can refer to for precedence :). can we
have --with-abi accept both forms to keep things simple for the
package maintainers (i.e. me) ?
+ case ${with_abi} in
+ ""|32|m32)
+ ....
+ 64|m64)
+ ....
+ x32|mx32)
+ ....
this allows code doing multilib mapping to be written once rather than
needing one chunk for --with-multilib-list, and then mostly
duplicating it for --with-abi ...
-mike
Done on both hjl/x32/mx32 and hjl/x32/gcc-4_6-branch+mx32 branches.
--
H.J.
this one ICEs for me with binutils-2.22 and glibc-2.14.1 when using
--with-abi :(. omitting --with-abi (so that the default is the
standard x86-64 output) works.
using 49e5ed49c41a142e0ec6788d1af2d04ece0187fb, see the failure below:
CFLAGS='-O2 -pipe' \
CXXFLAGS='-O2 -pipe' \
../configure \
--prefix=/usr \
--host=x86_64-pc-linux-gnu \
--build=x86_64-pc-linux-gnu \
--without-ppl \
--without-cloog \
--with-system-zlib \
--disable-lto \
--disable-nls \
--disable-werror \
--disable-libmudflap \
--disable-libssp \
--disable-libgomp \
--disable-libgcj \
--disable-libquadmath \
--enable-checking=release \
--enable-languages=c \
--enable-multilib \
--with-multilib-list=m64,m32,mx32 \
--with-abi=x32 \
--enable-shared \
--enable-threads=posix \
--enable-__cxa_atexit \
--enable-clocale=gnu
make bootstrap-lean -j4
/usr/local/src/gnu/gcc/git/build/./prev-gcc/xgcc
-B/usr/local/src/gnu/gcc/git/build/./prev-gcc/
-B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/bin/
-B/usr/x86_64-pc-linux-gnu/lib/ -isystem
/usr/x86_64-pc-linux-gnu/include -isystem
/usr/x86_64-pc-linux-gnu/sys-include -I../../libcpp -I.
-I../../libcpp/../include -I../../libcpp/include -g -O2 -gtoggle -W
-Wall -Wwrite-strings -Wmissing-format-attribute -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -Wc++-compat -pedantic
-Wno-long-long -I../../libcpp -I. -I../../libcpp/../include
-I../../libcpp/include -c -o lex.o -MT lex.o -MMD -MP -MF
.deps/lex.Tpo ../../libcpp/lex.c
../../libcpp/lex.c: In function 'search_line_sse42':
../../libcpp/lex.c:438:4: internal compiler error: in
copy_to_mode_reg, at explow.c:635
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[3]: *** [lex.o] Error 1
make[3]: Leaving directory `/usr/local/src/gnu/gcc/git/build/libcpp'
-mike
just to follow up ... i talked to hjlu privately to post preprocessed
files/etc..., and he committed a fix to address this: "Properly handle
-m32, -m64 and -mx32 with target optimization". seems to be working
for me (gcc-4.7 mainline and gcc-4.6 backport).
-mike
I checked a patch into both hjl/x32/mx32 and hjl/x32/gcc-4_6-branch+mx32
branches so that you can configure gcc with
--disable-multilib --with-abi=mx32
to only enable x32 run-time libraries and install them under /lib.
--
H.J.