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

[-- Attachment #1 --]

> On Apr 9, 2015, at 8:40 PM, Mark Millard <markmi@dsl-only.net> wrote:
> 
> I now see one place where "-Wl,-m,elf32ppc_fbsd" type of notation in LDFLAGS would not be handled if it ended up involved:
> 
> share/mk/sys.mk:_LDFLAGS        =       ${LDFLAGS:S/-Wl,//g}    # strip -Wl, for LD
> 
> This notation does not deal with turning the extra comma back into a space.

It should be "-Wl,-m -Wl,elf32ppc_fbsd” since that’s the same, isn’t it? That’s what it will do. And that’s correct.

Warner

> ===
> Mark Millard
> markmi at dsl-only.net
> 
> On 2015-Apr-9, at 06:56 PM, Mark Millard <markmi at dsl-only.net> wrote:
> 
> From 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+=       -m elf32ppc_fbsd
>> /usr/src/sys/boot/ofw/Makefile.inc
> 
> 
>> LDFLAGS+=       -m elf32ppc_fbsd
>> /usr/src/sys/boot/uboot/Makefile.inc
> 
> 
>> LDFLAGS+=       -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'
>> 
>> *** [boot1.elf] Error code 1
>> 
>> 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’m not to the point of testing the behavior of that yet.
> 
> 
> 
> i386 seems to have a similar example, although I’m not using such a FreeBSD environment.
> 
>> LD_FLAGS+=      -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.)
> 
> ===
> Mark Millard
> markmi at dsl-only.net
> 
> 
> _______________________________________________
> 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"


[-- Attachment #2 --]
-----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-----

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