Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Apr 2015 18:56:21 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        freebsd-toolchain@freebsd.org
Cc:        freebsd-ppc-owner@freebsd.org
Subject:   Shorter version: -m elf32ppc_fbsd (and elf_i386_fbsd ?) vs. -Wl, -m, elf32ppc_fbsd problems (11.0-CURRENT and 10.1-STABLE)
Message-ID:  <0D8F0A9A-593E-4FEE-8F01-20799DE946B2@dsl-only.net>

next in thread | raw e-mail | index | archive | help
=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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0D8F0A9A-593E-4FEE-8F01-20799DE946B2>