mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 04:52:06 +03:00
edd57d380d
- Fixes the IPC bug - Fixes the terminfo bug - Moves the OSX SDK out of our nixcrpkgs fork. - Vendor nixcrpkgs instead of having it be a submodule.
44 lines
1.1 KiB
Bash
44 lines
1.1 KiB
Bash
source $setup
|
|
|
|
tar -xf $src
|
|
mv cctools-port-* cctools-port
|
|
|
|
cd cctools-port
|
|
|
|
for patch in $patches; do
|
|
echo applying patch $patch
|
|
patch -p1 -i $patch
|
|
done
|
|
|
|
# Similar to but not the same as the other _structs.h.
|
|
rm cctools/include/foreign/mach/i386/_structs.h
|
|
|
|
# Causes a troublesome undefined reference.
|
|
rm cctools/libstuff/vm_flush_cache.c
|
|
|
|
cd ..
|
|
|
|
mv cctools-port/cctools/misc .
|
|
mv cctools-port/cctools/include .
|
|
mv cctools-port/cctools/libstuff .
|
|
rm -r cctools-port
|
|
|
|
mkdir build
|
|
cd build
|
|
|
|
CFLAGS="-Wno-deprecated -Wno-deprecated-declarations -Wno-unused-result -Werror -Wfatal-errors -O2 -g -I../include -I../include/foreign -DPROGRAM_PREFIX=\\\"$host-\\\" -D__LITTLE_ENDIAN__ -D__private_extern__= -D__DARWIN_UNIX03 -DPACKAGE_NAME=\\\"cctools\\\" -DPACKAGE_VERSION=\\\"$apple_version\\\" -DEMULATED_HOST_CPU_TYPE=16777223 -DEMULATED_HOST_CPU_SUBTYPE=3"
|
|
|
|
CXXFLAGS="-std=gnu++11 $CFLAGS"
|
|
|
|
LDFLAGS="-ldl -lpthread"
|
|
|
|
for f in ../misc/strip.c ../libstuff/*.c; do
|
|
echo "compiling $f"
|
|
eval "gcc -c $CFLAGS $f -o $(basename $f).o"
|
|
done
|
|
|
|
gcc *.o $LDFLAGS -o $host-strip
|
|
|
|
mkdir -p $out/bin
|
|
cp $host-strip $out/bin/
|