From owner-svn-src-head@FreeBSD.ORG Fri Mar 23 19:37:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12EE51065670; Fri, 23 Mar 2012 19:37:46 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F14038FC0A; Fri, 23 Mar 2012 19:37:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2NJbj8g091044; Fri, 23 Mar 2012 19:37:45 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2NJbjXU091041; Fri, 23 Mar 2012 19:37:45 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201203231937.q2NJbjXU091041@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Fri, 23 Mar 2012 19:37:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233388 - in head/gnu/usr.bin/binutils/as: . mips-freebsd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2012 19:37:46 -0000 Author: gonzo Date: Fri Mar 23 19:37:45 2012 New Revision: 233388 URL: http://svn.freebsd.org/changeset/base/233388 Log: Make default ABI for as(1) to be the same as target platform. This change makes object files compiled with default flags by gcc and as compatible. Modified: head/gnu/usr.bin/binutils/as/Makefile head/gnu/usr.bin/binutils/as/mips-freebsd/itbl-cpu.h Modified: head/gnu/usr.bin/binutils/as/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/as/Makefile Fri Mar 23 19:32:30 2012 (r233387) +++ head/gnu/usr.bin/binutils/as/Makefile Fri Mar 23 19:37:45 2012 (r233388) @@ -43,6 +43,13 @@ SRCS+= app.c \ .if ${TARGET_CPUARCH} == "mips" SRCS+= itbl-ops.c itbl-parse.y itbl-lex.l +.if ${TARGET_ARCH:Mmips64*} != "" +CFLAGS+= -DMIPS_DEFAULT_ABI=N64_ABI -DMIPS_DEFAULT_64BIT=1 +.elif ${TARGET_ARCH:Mmipsn32*} != "" +CFLAGS+= -DMIPS_DEFAULT_ABI=N32_ABI +.else +MIPS_ABI_DEFAULT=ABI_32 +.endif .endif .if ${TARGET_ARCH} == "amd64" Modified: head/gnu/usr.bin/binutils/as/mips-freebsd/itbl-cpu.h ============================================================================== --- head/gnu/usr.bin/binutils/as/mips-freebsd/itbl-cpu.h Fri Mar 23 19:32:30 2012 (r233387) +++ head/gnu/usr.bin/binutils/as/mips-freebsd/itbl-cpu.h Fri Mar 23 19:37:45 2012 (r233388) @@ -3,14 +3,17 @@ #include "itbl-mips.h" /* Choose a default ABI for MIPS targets. */ -/* XXX: Where should this be ? */ +#ifndef MIPS_DEFAULT_ABI #define MIPS_DEFAULT_ABI NO_ABI +#endif /* Default CPU for MIPS targets. */ #define MIPS_CPU_STRING_DEFAULT "from-abi" /* Generate 64-bit code by default on MIPS targets. */ +#ifndef MIPS_DEFAULT_64BIT #define MIPS_DEFAULT_64BIT 0 +#endif /* Allow use of E_MIPS_ABI_O32 on MIPS targets. */ #define USE_E_MIPS_ABI_O32 1