Skip to content

Commit 177e1bf

Browse files
committed
we do not specify TARGET_STRIP= when CCDEBUG is set to -g because it will make gmake crash. sigh.
1 parent 0bf8bbe commit 177e1bf

File tree

2 files changed

+58
-8
lines changed

2 files changed

+58
-8
lines changed

t/sanity.t

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -978,8 +978,8 @@ platform: linux (linux)
978978
cp -rp bundle/ build/
979979
cd build
980980
cd LuaJIT-2.0.0-beta8
981-
make TARGET_STRIP= CCDEBUG=-g Q= PREFIX=/usr/local/openresty/luajit
982-
make install TARGET_STRIP= CCDEBUG=-g Q= PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root
981+
make CCDEBUG=-g Q= PREFIX=/usr/local/openresty/luajit
982+
make install CCDEBUG=-g Q= PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root
983983
export LUAJIT_LIB='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib'
984984
export LUAJIT_INC='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.0'
985985
cd ..
@@ -1009,11 +1009,61 @@ cd ../..
10091009
.PHONY: all install clean
10101010
10111011
all:
1012-
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) TARGET_STRIP= CCDEBUG=-g Q= PREFIX=/usr/local/openresty/luajit
1012+
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) CCDEBUG=-g Q= PREFIX=/usr/local/openresty/luajit
10131013
cd build/nginx-1.0.4 && $(MAKE)
10141014
10151015
install:
1016-
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) install TARGET_STRIP= CCDEBUG=-g Q= PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR)
1016+
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) install CCDEBUG=-g Q= PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR)
1017+
cd build/nginx-1.0.4 && $(MAKE) install DESTDIR=$(DESTDIR)
1018+
1019+
clean:
1020+
rm -rf build
1021+
1022+
1023+
1024+
=== TEST 19: --with-debug & luajit & --with-cc=cl
1025+
--- cmd: ./configure --with-luajit --with-debug --dry-run --with-cc=cl
1026+
--- out
1027+
platform: linux (linux)
1028+
cp -rp bundle/ build/
1029+
cd build
1030+
cd LuaJIT-2.0.0-beta8
1031+
make CCDEBUG=-g Q= HOST_CC=cl PREFIX=/usr/local/openresty/luajit
1032+
make install CCDEBUG=-g Q= HOST_CC=cl PREFIX=/usr/local/openresty/luajit DESTDIR=$OPENRESTY_BUILD_DIR/luajit-root
1033+
export LUAJIT_LIB='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/lib'
1034+
export LUAJIT_INC='$OPENRESTY_BUILD_DIR/luajit-root/usr/local/openresty/luajit/include/luajit-2.0'
1035+
cd ..
1036+
cd nginx-1.0.4
1037+
./configure --prefix=/usr/local/openresty/nginx \
1038+
--with-debug \
1039+
--with-cc-opt='-O0' \
1040+
--add-module=../echo-nginx-module-0.37rc1 \
1041+
--add-module=../xss-nginx-module-0.03rc3 \
1042+
--add-module=../ngx_devel_kit-0.2.17 \
1043+
--add-module=../set-misc-nginx-module-0.22rc1 \
1044+
--add-module=../form-input-nginx-module-0.07rc5 \
1045+
--add-module=../encrypted-session-nginx-module-0.01 \
1046+
--add-module=../ngx_lua-0.2.1rc2 \
1047+
--add-module=../headers-more-nginx-module-0.15 \
1048+
--add-module=../srcache-nginx-module-0.12 \
1049+
--add-module=../array-var-nginx-module-0.03rc1 \
1050+
--add-module=../memc-nginx-module-0.12 \
1051+
--add-module=../redis2-nginx-module-0.07 \
1052+
--add-module=../upstream-keepalive-nginx-module-0.3 \
1053+
--add-module=../auth-request-nginx-module-0.2 \
1054+
--add-module=../rds-json-nginx-module-0.12rc1 \
1055+
--with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib' \
1056+
--with-cc=cl --with-http_ssl_module
1057+
cd ../..
1058+
--- makefile
1059+
.PHONY: all install clean
1060+
1061+
all:
1062+
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) CCDEBUG=-g Q= HOST_CC=cl PREFIX=/usr/local/openresty/luajit
1063+
cd build/nginx-1.0.4 && $(MAKE)
1064+
1065+
install:
1066+
cd build/LuaJIT-2.0.0-beta8 && $(MAKE) install CCDEBUG=-g Q= HOST_CC=cl PREFIX=/usr/local/openresty/luajit DESTDIR=$(DESTDIR)
10171067
cd build/nginx-1.0.4 && $(MAKE) install DESTDIR=$(DESTDIR)
10181068
10191069
clean:

util/configure

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,12 @@ sub build_resty_opts {
326326

327327
my $extra_opts = ' TARGET_STRIP=';
328328

329-
if (defined $cc) {
330-
$extra_opts .= " HOST_CC=$cc";
329+
if ($opts->{debug}) {
330+
$extra_opts = ' CCDEBUG=-g Q=';
331331
}
332332

333-
if ($opts->{debug}) {
334-
$extra_opts .= ' CCDEBUG=-g Q=';
333+
if (defined $cc) {
334+
$extra_opts .= " HOST_CC=$cc";
335335
}
336336

337337
shell "make$extra_opts PREFIX=$luajit_prefix", $dry_run;

0 commit comments

Comments
 (0)