From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31321 invoked by alias); 12 Jan 2014 02:54:16 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 31310 invoked by uid 89); 12 Jan 2014 02:54:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ea0-f177.google.com Received: from mail-ea0-f177.google.com (HELO mail-ea0-f177.google.com) (209.85.215.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 12 Jan 2014 02:54:14 +0000 Received: by mail-ea0-f177.google.com with SMTP id n15so2657138ead.22 for ; Sat, 11 Jan 2014 18:54:10 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.15.54.72 with SMTP id s48mr18707195eew.3.1389495250932; Sat, 11 Jan 2014 18:54:10 -0800 (PST) Received: by 10.14.202.69 with HTTP; Sat, 11 Jan 2014 18:54:10 -0800 (PST) Date: Sun, 12 Jan 2014 02:57:00 -0000 Message-ID: Subject: gcc 4.x and support of x87 FPU in libstdc++ From: Denis K To: gcc@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2014-01/txt/msg00104.txt.bz2 Hello, I've been trying to compile gcc 4.5.4 from the sources using --with-fpmath=387 but I'm getting this error: "Invalid --with-fpmath=387". I looked in the configs and found that it doesn't support this option: case ${with_fpmath} in avx) tm_file="${tm_file} i386/avxmath.h" ;; sse) tm_file="${tm_file} i386/ssemath.h" ;; *) echo "Invalid --with-fpmath=$with_fpmath" 1>&2 exit 1 Basically, I started this whole thing because I need to supply a statically linked executable for an old target platform (in fact, it's an old Celeron but without any SSE2 instructions that are apparently used by libstdc++ by DEFAULT). The executable crashes at the first instruction (movq XMM0,...) coming from copying routines in the internals of libstdc++ with an "Illegal instruction" message. Is there any way to resolve this? I need to be on a fairly recent g++ to be able to port my existing code base and it should be all statically linked as the target OS hardly has anything installed. I was wondering if it's possible to supply these headers/sources from an older build to enable support for regular x87 instructions, so that no SSE instructions are referenced? PS Right now I'm trying a hack in gcc\config\i386\ssemath.h where I replace #undef TARGET_FPMATH_DEFAULT #define TARGET_FPMATH_DEFAULT (TARGET_SSE2 ? FPMATH_SSE : FPMATH_387) #undef TARGET_SUBTARGET32_ISA_DEFAULT #define TARGET_SUBTARGET32_ISA_DEFAULT \ (OPTION_MASK_ISA_MMX | OPTION_MASK_ISA_SSE | OPTION_MASK_ISA_SSE2) with #undef TARGET_FPMATH_DEFAULT #define TARGET_FPMATH_DEFAULT (FPMATH_387) #undef TARGET_SUBTARGET32_ISA_DEFAULT #define TARGET_SUBTARGET32_ISA_DEFAULT \ (OPTION_MASK_ISA_MMX ) But I'm not sure this is going to to work and what sort of side effects this could cause. Thanks.