|Subject:||Re: [Tinycc-devel] BUG "make install" always strips|
|Date:||Wed, 13 Jan 2021 07:29:03 +0100|
With this patch I pushed on mod:
diff --git a/configure b/configure
index 73f5e02..d135959 100755
@@ -159,6 +159,18 @@ for opt do
+# don't strip unless --strip-binaries is specified.
+# "make install-strip" still strips.
+case $"conftest" in
+ # strip is set (to yes) keep it.
+ # strip is not set, set it to no => CONFIG_strip=no
+ confvars="$confvars strip=no"
config.mak correctly sets “CONFIG_strip=no” which is then use compare with “no” in Makefile.
The change you may see is that default tcc build is bigger (not stripped) which is expected.
To strip, either use –strip-binaries or install with “make install-strip”
Porting tcc on OpenBSD, I discovered that “make install” always strips the tcc binaries (which failed, now fixed, in case of bootstrapping tcc with tcc on OpenBSD) even if –strip-binaries was not set.
The culprit is this code:
CFLAGS += -g
LDFLAGS += -g
CONFIG_strip = yes
LDFLAGS += -s
As CONFIG_strip is not set (!= no) it is forced to yes.
Either you pass –strip-binaries option or you install using “make install-strip” target. The “make install” should only install what has been compiled so far.
I fixed this by adding “CONFIG_strip=no” to
install: ; @$(MAKE) --no-print-directory install$(CFG) CONFIG_strip=no
Hope it’s the right way to fix it, please find another solution if you like.
|[Prev in Thread]||Current Thread||[Next in Thread]|