From owner-freebsd-toolchain@FreeBSD.ORG Fri Apr 10 04:40:15 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 C11D56E1 for ; Fri, 10 Apr 2015 04:40:15 +0000 (UTC) Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) (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 8C17617A for ; Fri, 10 Apr 2015 04:40:15 +0000 (UTC) Received: by pdea3 with SMTP id a3so10251135pde.3 for ; Thu, 09 Apr 2015 21:40:09 -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=kAM0sCXjUVOdGgLwZamN3s6M2ANFZIzJfdfuk5tJA0A=; b=lv7/TbzYG3uUhWawgnBTL084l31YW216qAJ92P8WK8Um2sStlvGBOPh++spV3zyCFR hupEITuZxhBGNIce7ENc69/9lIKXrsbQJPMxDO9KDFc0SL6iDElg/gFySAL5GTtTCsoH LBSwNRoNlWQMXwyciwEcOl/W8KTS83QfFD1HWYcVBR+cc0i6J4/WFrOfM+8Gs1ACI/V0 KT3C5KL2nrMuyr3I7GgV7YfOUol05ZKKIV1oHDLmqjrJf+7RXzEO8V7qEAqcaOCBIjV0 v9wRV01WD3NFTnjQFlBxP3Xp8D5Ve8dQQ7ReQ2uywtjBz/oNc2jE0O9niEd3oanyulnT whWw== X-Gm-Message-State: ALoCoQkQBcTLRKJcf2NWX2gWwTsS1qi4n0yyX+qpAXZ5M5XnqbidnzcfvdQ1AN3SKG9QCVIy6Krq X-Received: by 10.70.89.237 with SMTP id br13mr62300876pdb.135.1428640809364; Thu, 09 Apr 2015 21:40:09 -0700 (PDT) Received: from lgmac-pgupta.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id fc3sm670523pdb.22.2015.04.09.21.40.08 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 Apr 2015 21:40:08 -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=_2AF758D6-16F2-4888-903E-6DCE65385A8C"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Warner Losh In-Reply-To: Date: Thu, 9 Apr 2015 22:40:12 -0600 Message-Id: <95515F28-A077-4245-90CC-85235C58CAC5@bsdimp.com> References: <0D8F0A9A-593E-4FEE-8F01-20799DE946B2@dsl-only.net> To: Mark Millard X-Mailer: Apple Mail (2.2070.6) Cc: freebsd-toolchain@freebsd.org, FreeBSD PowerPC ML 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 04:40:15 -0000 --Apple-Mail=_2AF758D6-16F2-4888-903E-6DCE65385A8C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 9, 2015, at 8:40 PM, Mark Millard wrote: >=20 > I now see one place where "-Wl,-m,elf32ppc_fbsd" type of notation in = LDFLAGS would not be handled if it ended up involved: >=20 > share/mk/sys.mk:_LDFLAGS =3D ${LDFLAGS:S/-Wl,//g} # = strip -Wl, for LD >=20 > This notation does not deal with turning the extra comma back into a = space. It should be "-Wl,-m -Wl,elf32ppc_fbsd=E2=80=9D since that=E2=80=99s the = same, isn=E2=80=99t it? That=E2=80=99s what it will do. And that=E2=80=99s= correct. Warner > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 > On 2015-Apr-9, at 06: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.) >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 >=20 > _______________________________________________ > freebsd-toolchain@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain > To unsubscribe, send any mail to = "freebsd-toolchain-unsubscribe@freebsd.org" --Apple-Mail=_2AF758D6-16F2-4888-903E-6DCE65385A8C 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 iQIcBAEBCgAGBQJVJ1QsAAoJEGwc0Sh9sBEA6LIQAI4XnfOpjioNjyTeAmxllbtu Qfpe2O7n61lD/HzmC7CRQKoHsJyMfjfbBFVV312lOh3tL0cL6arsMyv7WSFQsCFE 7ZXKhjmRAAe/qtviHawg8nIl8N5vu1So56k+zRcJYHlb3x/5iKkAaqwvp85lt0+r Sg2IuQ5rxsTKV3NPR5M0FKrPVklak9s9MMpglell0ZmoU2AysGNiCvFV8lrK8w1p 2lKYdnCmiHhFCRp8Jd8pENQiBv5fKTLykj+z0lKgr6nJbt8qm+QiP6K4ogGv68kj OURz6bcNvRt597UCuUrH9AQ/gbX0zwAM0AjvMPlZnBNMVZDSKIGsnFjw4BUn04pq AcZwTKxCqvJn+pdkvH9rDefx+/RyLzpb68FZoIxZPU87CDilpCno8ALqf+ZnsRQM xXrqDqeqY6n5g7EUhavAfxK7UL/+rAwxxLuVgemdhYptRS/3moUhLfZzWLgqqk5V Yfr9I+6LkDLPtABNgnBppp73B8CUh5feYMbaUi6XmsAlRdvUpp622IWvI1mRAHOS DXjINS68cmwnTajC2fmoCH4L8kyEw3RmXTMfKIs/XkxDKtfYN6z5Vo394dN8EZUU 2NumwO4bis4x8FKUZisSdWuyvZfoboY66C4Uc7swLk6P56wpeluuhaSjuVJaLB/T 0F17NG2b0c4kvQrAr4Z3 =hqHK -----END PGP SIGNATURE----- --Apple-Mail=_2AF758D6-16F2-4888-903E-6DCE65385A8C--