Skip to content

Commit

Permalink
support icx compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
cielavenir committed Jul 2, 2021
1 parent 55e4d0e commit 3c903c9
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ export CC := $(PREFIX)clang
#export CXX := $(PREFIX)clang++ -stdlib=libc++
export CXX := $(PREFIX)clang++
else ifneq ($(OPEN64),)
export CC := $(PREFIX)opencc
export CXX := $(PREFIX)openCC
export CC := $(PREFIX)opencc
export CXX := $(PREFIX)openCC
else ifneq ($(ICC),)
export CC := $(PREFIX)icc
export CXX := $(PREFIX)icpc
export CC := $(PREFIX)icc
export CXX := $(PREFIX)icpc
else ifneq ($(ICX),)
export CC := $(PREFIX)icx
export CXX := $(PREFIX)icpx
else
export CC := $(PREFIX)gcc
export CXX := $(PREFIX)g++
Expand Down
2 changes: 1 addition & 1 deletion applet/zlibrawstdio_compress.h
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ static int zlibrawstdio_main(const int argc, const char **argv){
POPT_TABLEEND,
};
optCon = poptGetContext(argv[0], argc, argv, optionsTable, 0);
poptSetOtherOptionHelp(optCon, "{-cz9 <dec.bin >enc.bz2} or {-cd <enc.bz2 >dec.bin}");
poptSetOtherOptionHelp(optCon, "{-cz9 <dec.bin >enc.gz} or {-cd <enc.gz >dec.bin}");

for(;(optc=poptGetNextOpt(optCon))>=0;){
switch(optc){
Expand Down
4 changes: 3 additions & 1 deletion cielbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ __attribute__((noreturn)) static void usage(){
;

const char *compiler=
#if defined(__INTEL_COMPILER)
#if defined(__INTEL_CLANG_COMPILER)
" [icx]"
#elif defined(__INTEL_COMPILER)
" [icc]"
#elif defined(__OPENCC__)
" [opencc]"
Expand Down
11 changes: 11 additions & 0 deletions compile_icx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
if ! type icpc >/dev/null 2>/dev/null && [ -f /opt/intel/oneapi/setvars.sh ]; then
. /opt/intel/oneapi/setvars.sh
fi
make clean
echo "Self (icx)"
#ZLIBNG_X86=1 ICC=1 ARCH="-march=core2 -mmmx -msse -msse2 -msse3 -pthread" LIBS="-pthread -ldl" SUFF=_icc make
ZLIBNG_X86=1 ICX=1 ARCH="-march=native -pthread" LIBS="-pthread -ldl" SUFF=_icx make
make clean

upx --best --lzma cielbox_icx
1 change: 1 addition & 0 deletions zlibrawstdio
1 change: 1 addition & 0 deletions zlibrawstdio2

0 comments on commit 3c903c9

Please sign in to comment.