From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8666 invoked by alias); 19 Nov 2014 16:47:41 -0000 Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Received: (qmail 8654 invoked by uid 89); 19 Nov 2014 16:47:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f52.google.com Received: from mail-oi0-f52.google.com (HELO mail-oi0-f52.google.com) (209.85.218.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 19 Nov 2014 16:47:39 +0000 Received: by mail-oi0-f52.google.com with SMTP id h136so669360oig.25 for ; Wed, 19 Nov 2014 08:47:37 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.60.65.99 with SMTP id w3mr17327966oes.6.1416415657627; Wed, 19 Nov 2014 08:47:37 -0800 (PST) Received: by 10.76.12.74 with HTTP; Wed, 19 Nov 2014 08:47:37 -0800 (PST) Date: Wed, 19 Nov 2014 16:47:00 -0000 Message-ID: Subject: How to generate a cross gcc toolchain that accepts both -m32 and -m64 compiler option? From: Jimm Chen To: crossgcc@sourceware.org Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00008.txt.bz2 Using crosstool-ng 1.20, I've managed to build a gcc 4.8.3 cross compiler on openSUSE 12.3(32-bit) that is targeted at x86_64(x64) linux. The CT-NG tool is a life saver. However, I have a question. the generated compiler x86_64-pc-linux-gnu-gcc can only produce x64 executables. When I try to do x86_64-pc-linux-gnu-gcc -m32 hello.c I got error message like: /home/chj/x-tools/.../sysroot/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory # include ^ compilation terminated. You know, on an openSUSE Linux 64-bit distribution, we can use -m64 to produce 64-bit image and -m32 to produce 32-bit image. Can someone tell me how to achieve that functionality with CT-NG generated toolchain? -- For unsubscribe information see http://sourceware.org/lists.html#faq