Skip to content

Commit 1ceebf6

Browse files
committed
[SystemZ] Add configure bits This patch wires up the SystemZ target in configure, so that it can now be built using --enable-targets=systemz. It is not yet included in the default build (--enable-targets=all); this will be done by a follow-up patch. Patch by Richard Sandiford. llvm-svn: 181208
1 parent 80435ba commit 1ceebf6

File tree

7 files changed

+30
-8
lines changed

7 files changed

+30
-8
lines changed

llvm/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ set(LLVM_ALL_TARGETS
8989
)
9090

9191
# List of targets with JIT support:
92-
set(LLVM_TARGETS_WITH_JIT X86 PowerPC ARM Mips)
92+
set(LLVM_TARGETS_WITH_JIT X86 PowerPC ARM Mips SystemZ)
9393

9494
set(LLVM_TARGETS_TO_BUILD "all"
9595
CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")

llvm/autoconf/configure.ac

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ AC_CACHE_CHECK([target architecture],[llvm_cv_target_arch],
402402
hexagon-*) llvm_cv_target_arch="Hexagon" ;;
403403
mblaze-*) llvm_cv_target_arch="MBlaze" ;;
404404
nvptx-*) llvm_cv_target_arch="NVPTX" ;;
405+
s390x-*) llvm_cv_target_arch="SystemZ" ;;
405406
*) llvm_cv_target_arch="Unknown" ;;
406407
esac])
407408

@@ -435,6 +436,7 @@ case $host in
435436
msp430-*) host_arch="MSP430" ;;
436437
hexagon-*) host_arch="Hexagon" ;;
437438
mblaze-*) host_arch="MBlaze" ;;
439+
s390x-*) host_arch="SystemZ" ;;
438440
*) host_arch="Unknown" ;;
439441
esac
440442

@@ -654,6 +656,7 @@ else
654656
Hexagon) AC_SUBST(TARGET_HAS_JIT,0) ;;
655657
MBlaze) AC_SUBST(TARGET_HAS_JIT,0) ;;
656658
NVPTX) AC_SUBST(TARGET_HAS_JIT,0) ;;
659+
SystemZ) AC_SUBST(TARGET_HAS_JIT,1) ;;
657660
*) AC_SUBST(TARGET_HAS_JIT,0) ;;
658661
esac
659662
fi
@@ -795,7 +798,7 @@ TARGETS_TO_BUILD=""
795798
AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets],
796799
[Build specific host targets: all or target1,target2,... Valid targets are:
797800
host, x86, x86_64, sparc, powerpc, arm, aarch64, mips, hexagon,
798-
xcore, msp430, nvptx, and cpp (default=all)]),,
801+
xcore, msp430, nvptx, systemz, and cpp (default=all)]),,
799802
enableval=all)
800803
if test "$enableval" = host-only ; then
801804
enableval=host
@@ -820,6 +823,7 @@ case "$enableval" in
820823
hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;;
821824
mblaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;;
822825
nvptx) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;;
826+
systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
823827
host) case "$llvm_cv_target_arch" in
824828
x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
825829
x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
@@ -833,6 +837,7 @@ case "$enableval" in
833837
MSP430) TARGETS_TO_BUILD="MSP430 $TARGETS_TO_BUILD" ;;
834838
Hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;;
835839
NVPTX) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;;
840+
SystemZ) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
836841
*) AC_MSG_ERROR([Can not set target to build]) ;;
837842
esac ;;
838843
*) AC_MSG_ERROR([Unrecognized target $a_target]) ;;

llvm/cmake/config-ix.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,8 @@ elseif (LLVM_NATIVE_ARCH MATCHES "msp430")
378378
set(LLVM_NATIVE_ARCH MSP430)
379379
elseif (LLVM_NATIVE_ARCH MATCHES "hexagon")
380380
set(LLVM_NATIVE_ARCH Hexagon)
381+
elseif (LLVM_NATIVE_ARCH MATCHES "s390x")
382+
set(LLVM_NATIVE_ARCH SystemZ)
381383
else ()
382384
message(FATAL_ERROR "Unknown architecture ${LLVM_NATIVE_ARCH}")
383385
endif ()

llvm/configure

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,7 +1445,7 @@ Optional Features:
14451445
--enable-targets Build specific host targets: all or
14461446
target1,target2,... Valid targets are: host, x86,
14471447
x86_64, sparc, powerpc, arm, aarch64, mips, hexagon,
1448-
xcore, msp430, nvptx, and cpp (default=all)
1448+
xcore, msp430, nvptx, systemz, and cpp (default=all)
14491449
--enable-experimental-targets
14501450
Build experimental host targets: disable or
14511451
target1,target2,... (default=disable)
@@ -4026,6 +4026,7 @@ else
40264026
hexagon-*) llvm_cv_target_arch="Hexagon" ;;
40274027
mblaze-*) llvm_cv_target_arch="MBlaze" ;;
40284028
nvptx-*) llvm_cv_target_arch="NVPTX" ;;
4029+
s390x-*) llvm_cv_target_arch="SystemZ" ;;
40294030
*) llvm_cv_target_arch="Unknown" ;;
40304031
esac
40314032
fi
@@ -4059,6 +4060,7 @@ case $host in
40594060
msp430-*) host_arch="MSP430" ;;
40604061
hexagon-*) host_arch="Hexagon" ;;
40614062
mblaze-*) host_arch="MBlaze" ;;
4063+
s390x-*) host_arch="SystemZ" ;;
40624064
*) host_arch="Unknown" ;;
40634065
esac
40644066

@@ -5398,6 +5400,8 @@ else
53985400
MBlaze) TARGET_HAS_JIT=0
53995401
;;
54005402
NVPTX) TARGET_HAS_JIT=0
5403+
;;
5404+
SystemZ) TARGET_HAS_JIT=1
54015405
;;
54025406
*) TARGET_HAS_JIT=0
54035407
;;
@@ -5651,6 +5655,7 @@ case "$enableval" in
56515655
hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;;
56525656
mblaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;;
56535657
nvptx) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;;
5658+
systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
56545659
host) case "$llvm_cv_target_arch" in
56555660
x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
56565661
x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
@@ -5664,6 +5669,7 @@ case "$enableval" in
56645669
MSP430) TARGETS_TO_BUILD="MSP430 $TARGETS_TO_BUILD" ;;
56655670
Hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;;
56665671
NVPTX) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;;
5672+
SystemZ) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
56675673
*) { { echo "$as_me:$LINENO: error: Can not set target to build" >&5
56685674
echo "$as_me: error: Can not set target to build" >&2;}
56695675
{ (exit 1); exit 1; }; } ;;
@@ -10529,7 +10535,7 @@ else
1052910535
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1053010536
lt_status=$lt_dlunknown
1053110537
cat > conftest.$ac_ext <<EOF
10532-
#line 10532 "configure"
10538+
#line 10538 "configure"
1053310539
#include "confdefs.h"
1053410540

1053510541
#if HAVE_DLFCN_H

llvm/docs/GettingStarted.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ The following options can be used to set or enable LLVM specific options:
759759
case. The current set of targets is:
760760

761761
``arm, cpp, hexagon, mblaze, mips, mipsel, msp430, powerpc, ptx, sparc, spu,
762-
x86, x86_64, xcore``.
762+
systemz, x86, x86_64, xcore``.
763763

764764
``--enable-doxygen``
765765

llvm/projects/sample/autoconf/configure.ac

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ AC_CACHE_CHECK([target architecture],[llvm_cv_target_arch],
312312
hexagon-*) llvm_cv_target_arch="Hexagon" ;;
313313
mblaze-*) llvm_cv_target_arch="MBlaze" ;;
314314
nvptx-*) llvm_cv_target_arch="NVPTX" ;;
315+
s390x-*) llvm_cv_target_arch="SystemZ" ;;
315316
*) llvm_cv_target_arch="Unknown" ;;
316317
esac])
317318

@@ -482,6 +483,7 @@ else
482483
Hexagon) AC_SUBST(TARGET_HAS_JIT,0) ;;
483484
MBlaze) AC_SUBST(TARGET_HAS_JIT,0) ;;
484485
NVPTX) AC_SUBST(TARGET_HAS_JIT,0) ;;
486+
SystemZ) AC_SUBST(TARGET_HAS_JIT,1) ;;
485487
*) AC_SUBST(TARGET_HAS_JIT,0) ;;
486488
esac
487489
fi
@@ -592,7 +594,7 @@ TARGETS_TO_BUILD=""
592594
AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets],
593595
[Build specific host targets: all or target1,target2,... Valid targets are:
594596
host, x86, x86_64, sparc, powerpc, arm, mips, spu, hexagon,
595-
xcore, msp430, nvptx, and cpp (default=all)]),,
597+
xcore, msp430, nvptx, systemz, and cpp (default=all)]),,
596598
enableval=all)
597599
if test "$enableval" = host-only ; then
598600
enableval=host
@@ -614,6 +616,7 @@ case "$enableval" in
614616
cpp) TARGETS_TO_BUILD="CppBackend $TARGETS_TO_BUILD" ;;
615617
mblaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;;
616618
nvptx) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;;
619+
systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
617620
host) case "$llvm_cv_target_arch" in
618621
x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
619622
x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
@@ -627,6 +630,7 @@ case "$enableval" in
627630
MSP430) TARGETS_TO_BUILD="MSP430 $TARGETS_TO_BUILD" ;;
628631
Hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;;
629632
NVPTX) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;;
633+
SystemZ) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
630634
*) AC_MSG_ERROR([Can not set target to build]) ;;
631635
esac ;;
632636
*) AC_MSG_ERROR([Unrecognized target $a_target]) ;;

llvm/projects/sample/configure

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,7 @@ Optional Features:
14061406
--enable-targets Build specific host targets: all or
14071407
target1,target2,... Valid targets are: host, x86,
14081408
x86_64, sparc, powerpc, arm, mips, spu, hexagon,
1409-
xcore, msp430, nvptx, and cpp (default=all)
1409+
xcore, msp430, nvptx, systemz, and cpp (default=all)
14101410
--enable-bindings Build specific language bindings:
14111411
all,auto,none,{binding-name} (default=auto)
14121412
--enable-libffi Check for the presence of libffi (default is NO)
@@ -3852,6 +3852,7 @@ else
38523852
hexagon-*) llvm_cv_target_arch="Hexagon" ;;
38533853
mblaze-*) llvm_cv_target_arch="MBlaze" ;;
38543854
nvptx-*) llvm_cv_target_arch="NVPTX" ;;
3855+
s390x-*) llvm_cv_target_arch="SystemZ" ;;
38553856
*) llvm_cv_target_arch="Unknown" ;;
38563857
esac
38573858
fi
@@ -5115,6 +5116,8 @@ else
51155116
MBlaze) TARGET_HAS_JIT=0
51165117
;;
51175118
NVPTX) TARGET_HAS_JIT=0
5119+
;;
5120+
SystemZ) TARGET_HAS_JIT=1
51185121
;;
51195122
*) TARGET_HAS_JIT=0
51205123
;;
@@ -5316,6 +5319,7 @@ case "$enableval" in
53165319
cpp) TARGETS_TO_BUILD="CppBackend $TARGETS_TO_BUILD" ;;
53175320
mblaze) TARGETS_TO_BUILD="MBlaze $TARGETS_TO_BUILD" ;;
53185321
nvptx) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;;
5322+
systemz) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
53195323
host) case "$llvm_cv_target_arch" in
53205324
x86) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
53215325
x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
@@ -5329,6 +5333,7 @@ case "$enableval" in
53295333
MSP430) TARGETS_TO_BUILD="MSP430 $TARGETS_TO_BUILD" ;;
53305334
Hexagon) TARGETS_TO_BUILD="Hexagon $TARGETS_TO_BUILD" ;;
53315335
NVPTX) TARGETS_TO_BUILD="NVPTX $TARGETS_TO_BUILD" ;;
5336+
SystemZ) TARGETS_TO_BUILD="SystemZ $TARGETS_TO_BUILD" ;;
53325337
*) { { echo "$as_me:$LINENO: error: Can not set target to build" >&5
53335338
echo "$as_me: error: Can not set target to build" >&2;}
53345339
{ (exit 1); exit 1; }; } ;;
@@ -10353,7 +10358,7 @@ else
1035310358
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1035410359
lt_status=$lt_dlunknown
1035510360
cat > conftest.$ac_ext <<EOF
10356-
#line 10356 "configure"
10361+
#line 10361 "configure"
1035710362
#include "confdefs.h"
1035810363

1035910364
#if HAVE_DLFCN_H

0 commit comments

Comments
 (0)