This reverts commit ece74ceaaf0f1dd89e8520f73149867a6fa73082. codesigning is already supported via --config-codesign. This patch actually broke testing for tcc builds with that set.
Unified · Split
| @@ -77,12 +77,6 @@ TCCFLAGS = $(TCCFLAGS$(CFG)) · 76 unmodified lines | |||
| 77 | TCC_LOCAL = $(TOP)/tcc$(EXESUF) | 77 | TCC_LOCAL = $(TOP)/tcc$(EXESUF) |
| 78 | TCC = $(TCC_LOCAL) $(TCCFLAGS) | 78 | TCC = $(TCC_LOCAL) $(TCCFLAGS) |
| 79 | 79 | ||
| 80 | ifdef CONFIG_OSX | ||
| 81 | CODESIGN = codesign -s - | ||
| 82 | else | ||
| 83 | CODESIGN = true | ||
| 84 | endif | ||
| 85 | |||
| 86 | CFLAGS_P = $(CFLAGS) -pg -static -DCONFIG_TCC_STATIC -DTCC_PROFILE | 80 | CFLAGS_P = $(CFLAGS) -pg -static -DCONFIG_TCC_STATIC -DTCC_PROFILE |
| 87 | LIBS_P = $(LIBS) | 81 | LIBS_P = $(LIBS) |
| 88 | LDFLAGS_P = $(LDFLAGS) | 82 | LDFLAGS_P = $(LDFLAGS) |
| @@ -81,7 +81,7 @@ all test : · 80 unmodified lines | |||
| 81 | 81 | ||
| 82 | hello-exe: ../examples/ex1.c | 82 | hello-exe: ../examples/ex1.c |
| 83 | @echo ------------ $@ ------------ | 83 | @echo ------------ $@ ------------ |
| 84 | $(TCC) $< -o hello$(EXESUF) && $(CODESIGN) hello$(EXESUF) && ./hello$(EXESUF) || $(DUMPTCC) | 84 | $(TCC) $< -o hello$(EXESUF) && ./hello$(EXESUF) || $(DUMPTCC) |
| 85 | 85 | ||
| 86 | hello-run: ../examples/ex1.c | 86 | hello-run: ../examples/ex1.c |
| 87 | @echo ------------ $@ ------------ | 87 | @echo ------------ $@ ------------ |
| @@ -156,9 +156,7 @@ test4_static: tcctest.c test.ref · 68 unmodified lines | |||
| 156 | dlltest: | 156 | dlltest: |
| 157 | @echo ------------ $@ ------------ | 157 | @echo ------------ $@ ------------ |
| 158 | $(TCC) $(NATIVE_DEFINES) -DLIBTCC_AS_DLL $(TOPSRC)/libtcc.c $(LIBS) -shared -o libtcc2$(DLLSUF) | 158 | $(TCC) $(NATIVE_DEFINES) -DLIBTCC_AS_DLL $(TOPSRC)/libtcc.c $(LIBS) -shared -o libtcc2$(DLLSUF) |
| 159 | $(CODESIGN) libtcc2$(DLLSUF) | ||
| 160 | $(TCC) $(NATIVE_DEFINES) -DONE_SOURCE=0 $(TOPSRC)/tcc.c libtcc2$(DLLSUF) $(LIBS) -Wl,-rpath=. -o tcc2$(EXESUF) | 159 | $(TCC) $(NATIVE_DEFINES) -DONE_SOURCE=0 $(TOPSRC)/tcc.c libtcc2$(DLLSUF) $(LIBS) -Wl,-rpath=. -o tcc2$(EXESUF) |
| 161 | $(CODESIGN) tcc2$(EXESUF) | ||
| 162 | ./tcc2$(EXESUF) $(TCCFLAGS) $(RUN_TCC) -run $(TOPSRC)/examples/ex1.c | 160 | ./tcc2$(EXESUF) $(TCCFLAGS) $(RUN_TCC) -run $(TOPSRC)/examples/ex1.c |
| 163 | ifeq (,$(filter Darwin WIN32,$(TARGETOS))) | 161 | ifeq (,$(filter Darwin WIN32,$(TARGETOS))) |
| 164 | @echo ------------ $@ with PIC ------------ | 162 | @echo ------------ $@ with PIC ------------ |
| @@ -243,7 +241,6 @@ abitest-cc.exe: abitest.c $(LIBTCC) · 78 unmodified lines | |||
| 243 | 241 | ||
| 244 | abitest-tcc.exe: abitest.c libtcc.c | 242 | abitest-tcc.exe: abitest.c libtcc.c |
| 245 | $(TCC) -o $@ $^ $(NATIVE_DEFINES) $(LIBS) | 243 | $(TCC) -o $@ $^ $(NATIVE_DEFINES) $(LIBS) |
| 246 | $(CODESIGN) $@ | ||
| 247 | 244 | ||
| 248 | abitest-% : abitest-%.exe | 245 | abitest-% : abitest-%.exe |
| 249 | @echo ------------ $@ ------------ | 246 | @echo ------------ $@ ------------ |
| @@ -256,7 +253,6 @@ endif · 6 unmodified lines | |||
| 256 | 253 | ||
| 257 | vla_test$(EXESUF): vla_test.c | 254 | vla_test$(EXESUF): vla_test.c |
| 258 | $(TCC) -o $@ $^ | 255 | $(TCC) -o $@ $^ |
| 259 | $(CODESIGN) $@ | ||
| 260 | 256 | ||
| 261 | vla_test-run: vla_test$(EXESUF) | 257 | vla_test-run: vla_test$(EXESUF) |
| 262 | @echo ------------ $@ ------------ | 258 | @echo ------------ $@ ------------ |
| @@ -105,11 +105,8 @@ GEN-ALWAYS = · 104 unmodified lines | |||
| 105 | # this test creates two DLLs and an EXE | 105 | # this test creates two DLLs and an EXE |
| 106 | 113_btdll.test: T1 = \ | 106 | 113_btdll.test: T1 = \ |
| 107 | $(TCC) -bt $1 -shared -D DLL=1 -o a1$(DLLSUF) && \ | 107 | $(TCC) -bt $1 -shared -D DLL=1 -o a1$(DLLSUF) && \ |
| 108 | $(CODESIGN) a1$(DLLSUF) && \ | ||
| 109 | $(TCC) -bt $1 -shared -D DLL=2 -o a2$(DLLSUF) && \ | 108 | $(TCC) -bt $1 -shared -D DLL=2 -o a2$(DLLSUF) && \ |
| 110 | $(CODESIGN) a2$(DLLSUF) && \ | ||
| 111 | $(TCC) -bt $1 a1$(DLLSUF) a2$(DLLSUF) -Wl,-rpath=. -o $(basename $@).exe && \ | 109 | $(TCC) -bt $1 a1$(DLLSUF) a2$(DLLSUF) -Wl,-rpath=. -o $(basename $@).exe && \ |
| 112 | $(CODESIGN) $(basename $@).exe && \ | ||
| 113 | ./$(basename $@).exe | 110 | ./$(basename $@).exe |
| 114 | 111 | ||
| 115 | 114_bound_signal.test: FLAGS += -b | 112 | 114_bound_signal.test: FLAGS += -b |
| @@ -139,7 +136,7 @@ all test tests2.all: $(filter-out $(SKIP),$(TESTS)) · 23 unmodified lines | |||
| 139 | @$(call T1,$<) $(T3) | 136 | @$(call T1,$<) $(T3) |
| 140 | 137 | ||
| 141 | T1 = $(TCC) $(FLAGS) $(T2) $(ARGS) | 138 | T1 = $(TCC) $(FLAGS) $(T2) $(ARGS) |
| 142 | T2 = $(if $(NORUN),$1 -o $(basename $@).exe && $(CODESIGN) $(basename $@).exe && ./$(basename $@).exe,-run $1) | 139 | T2 = $(if $(NORUN),$1 -o $(basename $@).exe && ./$(basename $@).exe,-run $1) |
| 143 | T3 = $(FILTER) >$*.output 2>&1 || true \ | 140 | T3 = $(FILTER) >$*.output 2>&1 || true \ |
| 144 | && diff -Nbu $(filter %.expect,$^) $*.output \ | 141 | && diff -Nbu $(filter %.expect,$^) $*.output \ |
| 145 | && rm -f $*.output $(filter $*.expect,$(GEN-ALWAYS)) | 142 | && rm -f $*.output $(filter $*.expect,$(GEN-ALWAYS)) |
| @@ -180,4 +177,4 @@ $(sort $(GEN-ALWAYS) $(UPDATE)) : force · 34 unmodified lines | |||
| 180 | force: | 177 | force: |
| 181 | 178 | ||
| 182 | clean : | 179 | clean : |
| 183 | rm -f fred.txt *.output *.exe *.dll *.so *.dylib *.def $(GEN-ALWAYS) | 180 | rm -f fred.txt *.output *.exe *.dll *.so *.def $(GEN-ALWAYS) |