gcc: define _REENTRANT for OpenRISC when -pthread is passed

The detection of pthread support fails on OpenRISC unless _REENTRANT
is defined. Added the CPP_SPEC definition to correct this.

gcc/ChangeLog:

	PR target/94372
	* config/or1k/linux.h (CPP_SPEC): Define.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
This commit is contained in:
Bernd Kuhls
2020-03-27 21:23:53 +01:00
committed by Stafford Horne
parent 9f6f411f63
commit cac2f69cda

View File

@@ -32,6 +32,8 @@
#undef MUSL_DYNAMIC_LINKER
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-or1k.so.1"
#define CPP_SPEC "%{pthread:-D_REENTRANT}"
#undef LINK_SPEC
#define LINK_SPEC "%{h*} \
%{static:-Bstatic} \