On Tue, Jun 7, 2011 at 8:59 AM, Joseph S. Myers <jos...@codesourcery.com> wrote:
> An additional comment on the specs: OPTION_DEFAULT_SPECS needs updating
> (-mx32 should use the --with-arch-64 etc. settings).
>

The current x32 branch works like this:

[hjl@gnu-6 gcc]$  ./xgcc -B./ -v -O /tmp/x.i -S
Reading specs from ./specs
COLLECT_GCC=./xgcc
COLLECT_LTO_WRAPPER=./lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /export/gnu/import/git/gcc-x32/configure
--enable-languages=c --disable-bootstrap --prefix=/usr/gcc-4.7.0-x32
--with-local-prefix=/usr/local --enable-gnu-indirect-function
--enable-x32 --with-arch-32=atom --with-cpu-64=corei7
--enable-cloog-backend=isl --with-ppl-include=/opt/gnu/include
--with-ppl-lib=/opt/gnu/lib64 --with-cloog-include=/opt/gnu/include
--with-cloog-lib=/opt/gnu/lib64 --with-fpmath=sse
Thread model: posix
gcc version 4.7.0 20110607 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-B' './' '-v' '-O' '-S' '-mtune=corei7' '-march=x86-64'
 ./cc1 -fpreprocessed /tmp/x.i -quiet -dumpbase x.i -mtune=corei7
-march=x86-64 -auxbase x -O -version -o x.s
GNU C (GCC) version 4.7.0 20110607 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20110509 (Red Hat 4.6.0-7), GMP
version 4.3.2, MPFR version 3.0.0, MPC version 0.8.3-dev
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.7.0 20110607 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20110509 (Red Hat 4.6.0-7), GMP
version 4.3.2, MPFR version 3.0.0, MPC version 0.8.3-dev
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 4ce06b87a1cd6526b31d62b0b2a64ecd
COMPILER_PATH=./
LIBRARY_PATH=./:/lib/../lib64/:/usr/lib/../lib64/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-B' './' '-v' '-O' '-S' '-mtune=corei7' '-march=x86-64'
[hjl@gnu-6 gcc]$  ./xgcc -B./ -v -O /tmp/x.i -S -mx32
Reading specs from ./specs
COLLECT_GCC=./xgcc
COLLECT_LTO_WRAPPER=./lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /export/gnu/import/git/gcc-x32/configure
--enable-languages=c --disable-bootstrap --prefix=/usr/gcc-4.7.0-x32
--with-local-prefix=/usr/local --enable-gnu-indirect-function
--enable-x32 --with-arch-32=atom --with-cpu-64=corei7
--enable-cloog-backend=isl --with-ppl-include=/opt/gnu/include
--with-ppl-lib=/opt/gnu/lib64 --with-cloog-include=/opt/gnu/include
--with-cloog-lib=/opt/gnu/lib64 --with-fpmath=sse
Thread model: posix
gcc version 4.7.0 20110607 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-B' './' '-v' '-O' '-S' '-mx32' '-mtune=corei7'
'-march=x86-64'
 ./cc1 -fpreprocessed /tmp/x.i -quiet -dumpbase x.i -mx32
-mtune=corei7 -march=x86-64 -auxbase x -O -version -o x.s
GNU C (GCC) version 4.7.0 20110607 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20110509 (Red Hat 4.6.0-7), GMP
version 4.3.2, MPFR version 3.0.0, MPC version 0.8.3-dev
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.7.0 20110607 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20110509 (Red Hat 4.6.0-7), GMP
version 4.3.2, MPFR version 3.0.0, MPC version 0.8.3-dev
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 4ce06b87a1cd6526b31d62b0b2a64ecd
COMPILER_PATH=./
LIBRARY_PATH=./x32/:/lib/../libx32/:/usr/lib/../libx32/:./:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-B' './' '-v' '-O' '-S' '-mx32' '-mtune=corei7'
'-march=x86-64'
[hjl@gnu-6 gcc]$  ./xgcc -B./ -v -O /tmp/x.i -S -m32
Reading specs from ./specs
COLLECT_GCC=./xgcc
COLLECT_LTO_WRAPPER=./lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /export/gnu/import/git/gcc-x32/configure
--enable-languages=c --disable-bootstrap --prefix=/usr/gcc-4.7.0-x32
--with-local-prefix=/usr/local --enable-gnu-indirect-function
--enable-x32 --with-arch-32=atom --with-cpu-64=corei7
--enable-cloog-backend=isl --with-ppl-include=/opt/gnu/include
--with-ppl-lib=/opt/gnu/lib64 --with-cloog-include=/opt/gnu/include
--with-cloog-lib=/opt/gnu/lib64 --with-fpmath=sse
Thread model: posix
gcc version 4.7.0 20110607 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-B' './' '-v' '-O' '-S' '-m32' '-mtune=generic'
'-march=atom'
 ./cc1 -fpreprocessed /tmp/x.i -quiet -dumpbase x.i -m32
-mtune=generic -march=atom -auxbase x -O -version -o x.s
GNU C (GCC) version 4.7.0 20110607 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20110509 (Red Hat 4.6.0-7), GMP
version 4.3.2, MPFR version 3.0.0, MPC version 0.8.3-dev
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.7.0 20110607 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.6.0 20110509 (Red Hat 4.6.0-7), GMP
version 4.3.2, MPFR version 3.0.0, MPC version 0.8.3-dev
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 4ce06b87a1cd6526b31d62b0b2a64ecd
COMPILER_PATH=./
LIBRARY_PATH=./32/:/lib/../lib/:/usr/lib/../lib/:./:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-B' './' '-v' '-O' '-S' '-m32' '-mtune=generic'
'-march=atom'
[hjl@gnu-6 gcc]$

That is -mx32 takes the same default as -m64. It is the correct
behavior for -mx32.


-- 
H.J.

Reply via email to