From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23726 invoked by alias); 7 Jun 2011 18:56:53 -0000 Received: (qmail 23713 invoked by uid 22791); 7 Jun 2011 18:56:51 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-qy0-f182.google.com (HELO mail-qy0-f182.google.com) (209.85.216.182) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jun 2011 18:56:37 +0000 Received: by qyk27 with SMTP id 27so2758862qyk.20 for ; Tue, 07 Jun 2011 11:56:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.11.1 with SMTP id r1mr3292949qar.147.1307472996118; Tue, 07 Jun 2011 11:56:36 -0700 (PDT) Received: by 10.229.47.78 with HTTP; Tue, 7 Jun 2011 11:56:36 -0700 (PDT) In-Reply-To: References: <20110605195441.GA1225@intel.com> Date: Tue, 07 Jun 2011 19:11:00 -0000 Message-ID: Subject: Re: PATCH [1/n]: Add initial -x32 support From: "H.J. Lu" To: "Joseph S. Myers" Cc: gcc-patches@gcc.gnu.org, Uros Bizjak Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00566.txt.bz2 On Tue, Jun 7, 2011 at 8:59 AM, Joseph S. Myers 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.