@@ -234,6 +234,7 @@ cprepro_options="-E"
234234archiver=" ${toolprefix} ar rcs"
235235libmath=" -lm"
236236responsefile=" gnu"
237+ pic_supported=false
237238
238239#
239240# ARM Target Configuration
@@ -352,17 +353,21 @@ if test "$arch" = "x86" -a "$bitsize" = "64"; then
352353 casm_options=" -m64 -c"
353354 clinker=" ${toolprefix} cc"
354355 clinker_options=" -m64"
356+ clinker_needs_no_pie=false
355357 cprepro=" ${toolprefix} cc"
356358 cprepro_options=" -m64 -U__GNUC__ -U__SIZEOF_INT128__ -E"
357359 system=" bsd"
360+ pic_supported=true
358361 ;;
359362 linux)
360363 abi=" standard"
361364 cc_options=" -m64"
362365 casm_options=" -m64 -c"
363366 clinker_options=" -m64"
367+ clinker_needs_no_pie=false
364368 cprepro_options=" -m64 -U__GNUC__ -U__SIZEOF_INT128__ -E"
365369 system=" linux"
370+ pic_supported=true
366371 ;;
367372 macos|macosx)
368373 abi=" macos"
@@ -373,6 +378,7 @@ if test "$arch" = "x86" -a "$bitsize" = "64"; then
373378 cprepro_options=" -arch x86_64 -U__GNUC__ -U__SIZEOF_INT128__ -U__clang__ -U__BLOCKS__ '-D__attribute__(x)=' '-D__asm(x)=' '-D_Nullable=' '-D_Nonnull=' '-D__DARWIN_OS_INLINE=static inline' -Wno-\\ #warnings -E"
374379 libmath=" "
375380 system=" macos"
381+ pic_supported=true
376382 ;;
377383 cygwin)
378384 abi=" standard"
@@ -403,8 +409,10 @@ if test "$arch" = "riscV"; then
403409 cc_options=" $model_options "
404410 casm_options=" $model_options -c"
405411 clinker_options=" $model_options "
412+ clinker_needs_no_pie=false
406413 cprepro_options=" $model_options -U__GNUC__ -E"
407414 system=" linux"
415+ pic_supported=true
408416fi
409417
410418#
@@ -415,7 +423,9 @@ if test "$arch" = "aarch64"; then
415423 linux)
416424 abi=" standard"
417425 cprepro_options=" -U__GNUC__ -E"
418- system=" linux" ;;
426+ system=" linux"
427+ pic_supported=true
428+ ;;
419429 macos|macosx)
420430 abi=" apple"
421431 casm=" ${toolprefix} cc"
@@ -427,6 +437,7 @@ if test "$arch" = "aarch64"; then
427437 cprepro_options=" -arch arm64 -U__GNUC__ -U__clang__ -U__BLOCKS__ '-D__attribute__(x)=' '-D__asm(x)=' '-D_Nullable=' '-D_Nonnull=' '-D__DARWIN_OS_INLINE=static inline' -Wno-\\ #warnings -E"
428438 libmath=" "
429439 system=" macos"
440+ pic_supported=true
430441 ;;
431442 * )
432443 echo " Error: invalid eabi/system '$target ' for architecture AArch64." 1>&2
@@ -697,6 +708,7 @@ HAS_STANDARD_HEADERS=$has_standard_headers
697708INSTALL_COQDEV=$install_coqdev
698709LIBMATH=$libmath
699710MODEL=$model
711+ PIC_SUPPORTED=$pic_supported
700712SYSTEM=$system
701713RESPONSEFILE=$responsefile
702714LIBRARY_FLOCQ=$library_Flocq
@@ -760,6 +772,10 @@ ENDIANNESS=
760772# SYSTEM=cygwin
761773SYSTEM=
762774
775+ # Are we able to produce position-independent code (with the `-fpic` option)?
776+ #PIC_SUPPORTED=true
777+ PIC_SUPPORTED=false
778+
763779# C compiler (for testing only)
764780CC=cc
765781
@@ -858,6 +874,7 @@ CompCert configuration:
858874 Hardware model................ $model
859875 Application binary interface.. $abi
860876 Endianness.................... $endianness
877+ PIC generation supported...... $pic_supported
861878 OS and development env........ $system
862879 C compiler.................... $cc $cc_options
863880 C preprocessor................ $cprepro $cprepro_options
0 commit comments