minimal-bootstrap.tinycc-*: static link by default
This commit is contained in:
parent
2ae0a16d59
commit
ea7533164c
|
@ -61,7 +61,7 @@ bash.runCommand "${pname}-${version}" {
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
make \
|
make \
|
||||||
CC="tcc -static -B ${tinycc.libs}/lib -I ." \
|
CC="tcc -B ${tinycc.libs}/lib -I ." \
|
||||||
AR="tcc -ar" \
|
AR="tcc -ar" \
|
||||||
bzip2 bzip2recover
|
bzip2 bzip2recover
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ bash.runCommand "${pname}-${version}" {
|
||||||
${lib.concatMapStringsSep "\n" (f: "patch -Np0 -i ${f}") patches}
|
${lib.concatMapStringsSep "\n" (f: "patch -Np0 -i ${f}") patches}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
export CC="tcc -static -B ${tinycc.libs}/lib"
|
export CC="tcc -B ${tinycc.libs}/lib"
|
||||||
export ac_cv_func_getpgrp_void=yes
|
export ac_cv_func_getpgrp_void=yes
|
||||||
export ac_cv_func_tzset=yes
|
export ac_cv_func_tzset=yes
|
||||||
bash ./configure \
|
bash ./configure \
|
||||||
|
|
|
@ -53,7 +53,7 @@ bash.runCommand "${pname}-${version}" {
|
||||||
cp ${makefile} Makefile
|
cp ${makefile} Makefile
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
make CC="tcc -static -B ${tinycc.libs}/lib"
|
make CC="tcc -B ${tinycc.libs}/lib"
|
||||||
|
|
||||||
# Install
|
# Install
|
||||||
make install PREFIX=$out
|
make install PREFIX=$out
|
||||||
|
|
|
@ -45,7 +45,7 @@ let
|
||||||
./configure \
|
./configure \
|
||||||
--build i686-pc-linux-gnu \
|
--build i686-pc-linux-gnu \
|
||||||
--host i686-pc-linux-gnu \
|
--host i686-pc-linux-gnu \
|
||||||
CC="${tinycc.compiler}/bin/tcc -B ${tinycc.libs}/lib -static" \
|
CC="${tinycc.compiler}/bin/tcc -B ${tinycc.libs}/lib" \
|
||||||
ac_cv_func_dup=no
|
ac_cv_func_dup=no
|
||||||
- `ac_cv_func_dup` disabled as mes-libc doesn't implement tmpfile()
|
- `ac_cv_func_dup` disabled as mes-libc doesn't implement tmpfile()
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ kaem.runCommand "${pname}-${version}" {
|
||||||
${lib.concatMapStringsSep "\n" (f: "CC -c ${f}") sources}
|
${lib.concatMapStringsSep "\n" (f: "CC -c ${f}") sources}
|
||||||
|
|
||||||
# Link
|
# Link
|
||||||
CC -static -o make ${lib.concatStringsSep " " objects}
|
CC -o make ${lib.concatStringsSep " " objects}
|
||||||
|
|
||||||
# Check
|
# Check
|
||||||
./make --version
|
./make --version
|
||||||
|
|
|
@ -95,7 +95,7 @@ kaem.runCommand "${pname}-${version}" {
|
||||||
${lib.concatMapStringsSep "\n" (f: "CC -c ${f}") sources}
|
${lib.concatMapStringsSep "\n" (f: "CC -c ${f}") sources}
|
||||||
|
|
||||||
# Link
|
# Link
|
||||||
CC -static -o patch ${lib.concatStringsSep " " objects}
|
CC -o patch ${lib.concatStringsSep " " objects}
|
||||||
|
|
||||||
# Check
|
# Check
|
||||||
./patch --version
|
./patch --version
|
||||||
|
|
|
@ -50,7 +50,7 @@ bash.runCommand "${pname}-${version}" {
|
||||||
cd tar-${version}
|
cd tar-${version}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
export CC="tcc -static -B ${tinycc.libs}/lib"
|
export CC="tcc -B ${tinycc.libs}/lib"
|
||||||
bash ./configure \
|
bash ./configure \
|
||||||
--build=${buildPlatform.config} \
|
--build=${buildPlatform.config} \
|
||||||
--host=${hostPlatform.config} \
|
--host=${hostPlatform.config} \
|
||||||
|
|
|
@ -46,7 +46,7 @@ bash.runCommand "${pname}-${version}" {
|
||||||
cd gzip-${version}
|
cd gzip-${version}
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
export CC="tcc -static -B ${tinycc.libs}/lib -Dstrlwr=unused"
|
export CC="tcc -B ${tinycc.libs}/lib -Dstrlwr=unused"
|
||||||
bash ./configure --prefix=$out
|
bash ./configure --prefix=$out
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
|
|
|
@ -29,6 +29,11 @@ let
|
||||||
mkdir -p ''${out}
|
mkdir -p ''${out}
|
||||||
cd ''${out}
|
cd ''${out}
|
||||||
untar --file ''${NIX_BUILD_TOP}/tinycc.tar
|
untar --file ''${NIX_BUILD_TOP}/tinycc.tar
|
||||||
|
|
||||||
|
# Patch
|
||||||
|
cd tinycc-${rev}
|
||||||
|
# Static link by default
|
||||||
|
replace --file libtcc.c --output libtcc.c --match-on "s->ms_extensions = 1;" --replace-with "s->ms_extensions = 1; s->static_link = 1;"
|
||||||
'') + "/tinycc-${rev}";
|
'') + "/tinycc-${rev}";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -74,7 +74,6 @@ rec {
|
||||||
-B ${prev.libs}/lib \
|
-B ${prev.libs}/lib \
|
||||||
-g \
|
-g \
|
||||||
-v \
|
-v \
|
||||||
-static \
|
|
||||||
-o ''${out}/bin/tcc \
|
-o ''${out}/bin/tcc \
|
||||||
-D BOOTSTRAP=1 \
|
-D BOOTSTRAP=1 \
|
||||||
${options} \
|
${options} \
|
||||||
|
|
|
@ -25,6 +25,11 @@ let
|
||||||
mkdir -p ''${out}
|
mkdir -p ''${out}
|
||||||
cd ''${out}
|
cd ''${out}
|
||||||
untar --file ''${NIX_BUILD_TOP}/tinycc.tar
|
untar --file ''${NIX_BUILD_TOP}/tinycc.tar
|
||||||
|
|
||||||
|
# Patch
|
||||||
|
cd tinycc-${builtins.substring 0 7 rev}
|
||||||
|
# Static link by default
|
||||||
|
replace --file libtcc.c --output libtcc.c --match-on "s->ms_extensions = 1;" --replace-with "s->ms_extensions = 1; s->static_link = 1;"
|
||||||
'') + "/tinycc-${builtins.substring 0 7 rev}";
|
'') + "/tinycc-${builtins.substring 0 7 rev}";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -39,7 +44,6 @@ let
|
||||||
mkdir ''${out}
|
mkdir ''${out}
|
||||||
${tinycc-bootstrappable.compiler}/bin/tcc \
|
${tinycc-bootstrappable.compiler}/bin/tcc \
|
||||||
-B ${tinycc-bootstrappable.libs}/lib \
|
-B ${tinycc-bootstrappable.libs}/lib \
|
||||||
-static \
|
|
||||||
-DC2STR \
|
-DC2STR \
|
||||||
-o c2str \
|
-o c2str \
|
||||||
${src}/conftest.c
|
${src}/conftest.c
|
||||||
|
|
Loading…
Reference in a new issue