mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
minimal-bootstrap.tinycc-*: static link by default
This commit is contained in:
parent
2ae0a16d59
commit
ea7533164c
10 changed files with 18 additions and 10 deletions
|
@ -61,7 +61,7 @@ bash.runCommand "${pname}-${version}" {
|
|||
|
||||
# Build
|
||||
make \
|
||||
CC="tcc -static -B ${tinycc.libs}/lib -I ." \
|
||||
CC="tcc -B ${tinycc.libs}/lib -I ." \
|
||||
AR="tcc -ar" \
|
||||
bzip2 bzip2recover
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ bash.runCommand "${pname}-${version}" {
|
|||
${lib.concatMapStringsSep "\n" (f: "patch -Np0 -i ${f}") patches}
|
||||
|
||||
# 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_tzset=yes
|
||||
bash ./configure \
|
||||
|
|
|
@ -53,7 +53,7 @@ bash.runCommand "${pname}-${version}" {
|
|||
cp ${makefile} Makefile
|
||||
|
||||
# Build
|
||||
make CC="tcc -static -B ${tinycc.libs}/lib"
|
||||
make CC="tcc -B ${tinycc.libs}/lib"
|
||||
|
||||
# Install
|
||||
make install PREFIX=$out
|
||||
|
|
|
@ -45,7 +45,7 @@ let
|
|||
./configure \
|
||||
--build 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` disabled as mes-libc doesn't implement tmpfile()
|
||||
|
||||
|
@ -178,7 +178,7 @@ kaem.runCommand "${pname}-${version}" {
|
|||
${lib.concatMapStringsSep "\n" (f: "CC -c ${f}") sources}
|
||||
|
||||
# Link
|
||||
CC -static -o make ${lib.concatStringsSep " " objects}
|
||||
CC -o make ${lib.concatStringsSep " " objects}
|
||||
|
||||
# Check
|
||||
./make --version
|
||||
|
|
|
@ -95,7 +95,7 @@ kaem.runCommand "${pname}-${version}" {
|
|||
${lib.concatMapStringsSep "\n" (f: "CC -c ${f}") sources}
|
||||
|
||||
# Link
|
||||
CC -static -o patch ${lib.concatStringsSep " " objects}
|
||||
CC -o patch ${lib.concatStringsSep " " objects}
|
||||
|
||||
# Check
|
||||
./patch --version
|
||||
|
|
|
@ -50,7 +50,7 @@ bash.runCommand "${pname}-${version}" {
|
|||
cd tar-${version}
|
||||
|
||||
# Configure
|
||||
export CC="tcc -static -B ${tinycc.libs}/lib"
|
||||
export CC="tcc -B ${tinycc.libs}/lib"
|
||||
bash ./configure \
|
||||
--build=${buildPlatform.config} \
|
||||
--host=${hostPlatform.config} \
|
||||
|
|
|
@ -46,7 +46,7 @@ bash.runCommand "${pname}-${version}" {
|
|||
cd gzip-${version}
|
||||
|
||||
# Configure
|
||||
export CC="tcc -static -B ${tinycc.libs}/lib -Dstrlwr=unused"
|
||||
export CC="tcc -B ${tinycc.libs}/lib -Dstrlwr=unused"
|
||||
bash ./configure --prefix=$out
|
||||
|
||||
# Build
|
||||
|
|
|
@ -29,6 +29,11 @@ let
|
|||
mkdir -p ''${out}
|
||||
cd ''${out}
|
||||
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}";
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -74,7 +74,6 @@ rec {
|
|||
-B ${prev.libs}/lib \
|
||||
-g \
|
||||
-v \
|
||||
-static \
|
||||
-o ''${out}/bin/tcc \
|
||||
-D BOOTSTRAP=1 \
|
||||
${options} \
|
||||
|
|
|
@ -25,6 +25,11 @@ let
|
|||
mkdir -p ''${out}
|
||||
cd ''${out}
|
||||
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}";
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -39,7 +44,6 @@ let
|
|||
mkdir ''${out}
|
||||
${tinycc-bootstrappable.compiler}/bin/tcc \
|
||||
-B ${tinycc-bootstrappable.libs}/lib \
|
||||
-static \
|
||||
-DC2STR \
|
||||
-o c2str \
|
||||
${src}/conftest.c
|
||||
|
|
Loading…
Reference in a new issue