Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Apr 2015 22:40:12 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Mark Millard <markmi@dsl-only.net>
Cc:        freebsd-toolchain@freebsd.org, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: Shorter version: -m elf32ppc_fbsd (and elf_i386_fbsd ?) vs. -Wl, -m, elf32ppc_fbsd problems (11.0-CURRENT and 10.1-STABLE)
Message-ID:  <95515F28-A077-4245-90CC-85235C58CAC5@bsdimp.com>
In-Reply-To: <FB904F08-081F-4905-B46B-A53F117CA5BF@dsl-only.net>
References:  <0D8F0A9A-593E-4FEE-8F01-20799DE946B2@dsl-only.net> <FB904F08-081F-4905-B46B-A53F117CA5BF@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <markmi@dsl-only.net> 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 <markmi at dsl-only.net> =
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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?95515F28-A077-4245-90CC-85235C58CAC5>