From owner-freebsd-toolchain@FreeBSD.ORG Fri Apr 10 02:03:05 2015 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58A7EEA3 for ; Fri, 10 Apr 2015 02:03:05 +0000 (UTC) Received: from asp.reflexion.net (outbound-243.asp.reflexion.net [69.84.129.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 010E3EEA for ; Fri, 10 Apr 2015 02:03:04 +0000 (UTC) Received: (qmail 16463 invoked from network); 10 Apr 2015 01:56:23 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 10 Apr 2015 01:56:23 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v7.40.1) with SMTP; Thu, 09 Apr 2015 21:56:23 -0400 (EDT) Received: (qmail 16311 invoked from network); 10 Apr 2015 01:56:22 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (DHE-RSA-AES256-SHA encrypted) SMTP; 10 Apr 2015 01:56:22 -0000 X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-67-189-19-145.hsd1.or.comcast.net [67.189.19.145]) by iron2.pdx.net (Postfix) with ESMTPSA id C07EA1C43A8; Thu, 9 Apr 2015 18:56:16 -0700 (PDT) From: Mark Millard Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Shorter version: -m elf32ppc_fbsd (and elf_i386_fbsd ?) vs. -Wl, -m, elf32ppc_fbsd problems (11.0-CURRENT and 10.1-STABLE) Date: Thu, 9 Apr 2015 18:56:21 -0700 Message-Id: <0D8F0A9A-593E-4FEE-8F01-20799DE946B2@dsl-only.net> To: freebsd-toolchain@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) X-Mailer: Apple Mail (2.2098) Cc: freebsd-ppc-owner@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2015 02:03:05 -0000 =46rom share/mk/bsd.README : LDFLAGS Additional loader flags. Passed to the loader via CC, since that's used to link programs as well, so loader specific flags need to be prefixed with -Wl, to work. But the following 3 powerpc (non-64) examples do not use the -Wl, = notation: > LDFLAGS+=3D -m elf32ppc_fbsd > /usr/src/sys/boot/ofw/Makefile.inc > LDFLAGS+=3D -m elf32ppc_fbsd > /usr/src/sys/boot/uboot/Makefile.inc > LDFLAGS+=3D -m elf32ppc_fbsd > /usr/src/sys/boot/powerpc/Makefile.inc In fact I get errors such as (for that last one when using powerpc64-gcc = via powerpc64-xtoolchain-gcc, executed on a powerpc64): > powerpc64-portbld-freebsd11.0-gcc: error: elf32ppc_fbsd: No such file = or directory > powerpc64-portbld-freebsd11.0-gcc: error: elf32ppc_fbsd: No such file = or directory > powerpc64-portbld-freebsd11.0-gcc: error: unrecognized command line = option '-m' > powerpc64-portbld-freebsd11.0-gcc: error: unrecognized command line = option '-m' >=20 > *** [boot1.elf] Error code 1 >=20 > make[6]: stopped in /usr/srcC/sys/boot/powerpc/boot1.chrp > 1 error I do not know if the space between -m and elf... creates a problem for = -Wl, use or not. I would guess that -Wl,-m,elf32pcc_fbsd is the proper notation for putting the space through to the ld variant = used. But I=E2=80=99m not to the point of testing the behavior of that = yet. i386 seems to have a similar example, although I=E2=80=99m not using = such a FreeBSD environment. > LD_FLAGS+=3D -m elf_i386_fbsd > /usr/src/sys/boot/i386/Makefile.inc (This note is shorter in part because figured out more context than I = had last time.) =3D=3D=3D Mark Millard markmi at dsl-only.net