diff options
author | MITSUNARI Shigeo <[email protected]> | 2022-11-21 16:39:13 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2022-11-21 16:39:13 +0900 |
commit | 8c64bbbc3175e36fa33aee017ad2621797e006d9 (patch) | |
tree | fb4526399fd4d2973701af0e68b8f9f57c7a1671 | |
parent | 5e9a9b96f521ca7eccb74c9e87d941ac6fbbda82 (diff) | |
download | xbyak-8c64bbbc3175e36fa33aee017ad2621797e006d9.tar.gz xbyak-8c64bbbc3175e36fa33aee017ad2621797e006d9.zip |
use gcc instead of dpkg for portability
-rw-r--r-- | test/Makefile | 7 | ||||
-rw-r--r-- | test/detect_x32.c | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/test/Makefile b/test/Makefile index 1b12756..0218407 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,7 +1,7 @@ TARGET = make_nm normalize_prefix bad_address misc cvt_test cvt_test32 noexception misc32 XBYAK_INC=../xbyak/xbyak.h UNAME_S=$(shell uname -s) -ifeq ($(shell dpkg --print-architecture),x32) +ifeq ($(shell ./detect_x32),x32) X32=1 endif BIT=32 @@ -98,7 +98,10 @@ ifeq ($(BIT),64) ./test_avx512.sh 64 endif -test: +detect_x32: detect_x32.c + $(CC) $< -o $@ + +test: detect_x32 $(MAKE) test_nm $(MAKE) test_avx $(MAKE) test_avx512 diff --git a/test/detect_x32.c b/test/detect_x32.c new file mode 100644 index 0000000..549b8d5 --- /dev/null +++ b/test/detect_x32.c @@ -0,0 +1,8 @@ +#include <stdio.h> + +int main() +{ +#if defined(__x86_64__) && defined(__ILP32__) + puts("x32"); +#endif +} |