]> git.ipfire.org Git - thirdparty/gcc.git/commit
Introduce -msmp to select /lib_smp/ on ppc-vx6
authorAlexandre Oliva <oliva@adacore.com>
Thu, 3 Aug 2023 06:34:31 +0000 (03:34 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Thu, 3 Aug 2023 06:34:31 +0000 (03:34 -0300)
commitb6f4b00011690415eb037a5c6f3e605f46d4d392
tree617033ae6f553ebd775aa060530b2dbcaa1d1a0f
parent39663298b5934831a0125e12f113ebd83248c3be
Introduce -msmp to select /lib_smp/ on ppc-vx6

The .spec files used for linking on ppc-vx6, when the rtp-smp runtime
is selected, add -L flags for /lib_smp/ and /lib/.

There was a problem, though: although /lib_smp/ and /lib/ were to be
searched in this order, and the specs files do that correctly, the
compiler would search /lib/ first regardless, because
STARTFILE_PREFIX_SPEC said so, and specs files cannot override that.

With this patch, we arrange for the presence of -msmp to affect
STARTFILE_PREFIX_SPEC, so that the compiler searches /lib_smp/ rather
than /lib/ for crt files.  A separate patch for GNAT ensures that when
the rtp-smp runtime is selected, -msmp is passed to the compiler
driver for linking, along with the --specs flags.

for  gcc/ChangeLog

* config/vxworks-smp.opt: New.  Introduce -msmp.
* config.gcc: Enable it on powerpc* vxworks prior to 7r*.
* config/rs6000/vxworks.h (STARTFILE_PREFIX_SPEC): Choose
lib_smp when -msmp is present in the command line.
* doc/invoke.texi: Document it.
gcc/config.gcc
gcc/config/rs6000/vxworks.h
gcc/config/vxworks-smp.opt [new file with mode: 0644]
gcc/doc/invoke.texi