From owner-freebsd-toolchain@FreeBSD.ORG Fri Apr 10 02:35:49 2015 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D002483 for ; Fri, 10 Apr 2015 02:35:49 +0000 (UTC) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ED5DA25C for ; Fri, 10 Apr 2015 02:35:48 +0000 (UTC) Received: by pabsx10 with SMTP id sx10so6986436pab.3 for ; Thu, 09 Apr 2015 19:35:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=Z2ZE9I8kmmwPz370tYnJThZEvnHMhg9wHQ4KfGibFyI=; b=mr/3VpggMN5LbUUDGO+WwyRoKILnqDd6zDjRCYUMnO0j+r03B1p3gsTnIjWaNtuBA6 STtyb4MxCtxSO/e6UFeSHl5MTLHa20lSIvnPgKyeGGawgNvO4UVhnoL34aKdtx1b+PCA WKGSceDlXIKwzBUEc5ag7QSlWvOs3MAZA+0P62Fk8tDU4a8UpUGClgXCcw3Yb7cENDI3 K0x+uQYG3bnJbpgtvoP4wF2y0RF7LZzQnOheTnHb+OCD807QLdqnAA1CXwGktDkKH76H 2BZ89H5WrlXr/KWE3lFSOGNPXhAWYHNj+pF7bB3wu5fq27IBVeZbl6v1L6jTEDFMv0ds JFIQ== X-Gm-Message-State: ALoCoQnkB9ppanwENzm3SLJ+QaPAINH4a6cfRfxJ4alhog+2kFFMe+RmQYCllQdKvibTKUJ2kYfa X-Received: by 10.68.204.199 with SMTP id la7mr60821562pbc.147.1428633341868; Thu, 09 Apr 2015 19:35:41 -0700 (PDT) Received: from lgmac-pgupta.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id n3sm384999pdm.90.2015.04.09.19.35.40 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 Apr 2015 19:35:41 -0700 (PDT) Sender: Warner Losh Subject: Re: Shorter version: -m elf32ppc_fbsd (and elf_i386_fbsd ?) vs. -Wl, -m, elf32ppc_fbsd problems (11.0-CURRENT and 10.1-STABLE) Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_1810AE61-2B69-432B-AADF-83D8267DB323"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Warner Losh In-Reply-To: <0D8F0A9A-593E-4FEE-8F01-20799DE946B2@dsl-only.net> Date: Thu, 9 Apr 2015 20:35:44 -0600 Message-Id: References: <0D8F0A9A-593E-4FEE-8F01-20799DE946B2@dsl-only.net> To: Mark Millard X-Mailer: Apple Mail (2.2070.6) Cc: freebsd-ppc-owner@freebsd.org, freebsd-toolchain@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:35:49 -0000 --Apple-Mail=_1810AE61-2B69-432B-AADF-83D8267DB323 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 9, 2015, at 7:56 PM, Mark Millard wrote: >=20 > =46rom share/mk/bsd.README : >=20 > 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. >=20 > But the following 3 powerpc (non-64) examples do not use the -Wl, = notation: >=20 >> LDFLAGS+=3D -m elf32ppc_fbsd >> /usr/src/sys/boot/ofw/Makefile.inc >=20 >=20 >> LDFLAGS+=3D -m elf32ppc_fbsd >> /usr/src/sys/boot/uboot/Makefile.inc >=20 >=20 >> LDFLAGS+=3D -m elf32ppc_fbsd >> /usr/src/sys/boot/powerpc/Makefile.inc >=20 > In fact I get errors such as (for that last one when using = powerpc64-gcc via powerpc64-xtoolchain-gcc, executed on a powerpc64): >=20 >> 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 >=20 > I do not know if the space between -m and elf... creates a problem for = -Wl, use or not. I would guess that >=20 > -Wl,-m,elf32pcc_fbsd >=20 > 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. >=20 >=20 >=20 > i386 seems to have a similar example, although I=E2=80=99m not using = such a FreeBSD environment. >=20 >> LD_FLAGS+=3D -m elf_i386_fbsd >> /usr/src/sys/boot/i386/Makefile.inc >=20 >=20 >=20 > (This note is shorter in part because figured out more context than I = had last time.) I think much of this is historical accident where the boot Makefiles = used to call ld directly, then were converted to call gcc, and gcc = allowed the -m notation like this as a historical compatibility. Do thinks still work if you use -Wl, notation? Warner --Apple-Mail=_1810AE61-2B69-432B-AADF-83D8267DB323 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVJzcBAAoJEGwc0Sh9sBEAB48P/1WVoGrkzD/Mhc2uHxc6uTR/ mJkNXIigB1rh9U/aqqzibY5hQKR2v/9BUCwC+oLEO5MsdJU6wI/y+dRx0ejuBz9L 2hT8ilOXEgnrUxM9ycEXBh47AOrTrIPk/LtjmBLkke+RqCfyH5AqeM6cTdRJ2FVc qGEOL/SD53kOwUPRnUhcC5DytHmvuFUaOibP+8eKUfzt22J34C9NWuDehdOWYt/F sTw/v84+oXDTZLkW5ZaF+RLH1BfeP2ed9M5NY8VES/TpL++jfejcFHgTA84d8hAu LrgDpHKlC10+Z0rqEvtoX5wX0b4mh7kCHQdXLIs2xRL381xhWlTuWaBID4c70/+r 7yTTn0fQ2JAYf/mFV4LoW54W6T/6Oo4gC9HNohzpX6MjQBJuc2r69uVqMUoskgSj CdDzPKuXXPsK1+ce8m6S+oQojgy7fXmrS6u+9e6AeTRsLaA0fNoUL0RKxSuE1wiz zEDhdtScPqKarLA0oy/8K/MGbyA7v4vgedUDzAUXGuG71pd4WCzXObEQEgRrwasz aScyTQ8rK+7N0yeUDO6HBhPQA02QufUy/BOVU3m8DAMlGf98jq2emN7mQMcY/vZS e5n8usZ+0kFDS5TViGLkV1DlXo3+Daq3w/rFyi/X0pW+3hiOc4kJWgcyDlU6QfWw UJ0K7jvHjk+4VhVgw00i =ixYJ -----END PGP SIGNATURE----- --Apple-Mail=_1810AE61-2B69-432B-AADF-83D8267DB323--