do some stuff i guess
This commit is contained in:
parent
74acce7243
commit
08bd19a395
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
CFLAGS="$CFLAGS -static -fPIC"
|
|
||||||
LDFLAGS="$LDFLAGS -static -fPIC -fno-lto -fno-use-linker-plugin -static -fPIC"
|
|
||||||
|
|
||||||
cat > makeinfo <<EOF
|
cat > makeinfo <<EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
printf 'makeinfo (GNU texinfo) 5.2\n'
|
printf 'makeinfo (GNU texinfo) 5.2\n'
|
||||||
|
@ -27,8 +24,6 @@ export PATH=$PATH:$PWD
|
||||||
--disable-gprof \
|
--disable-gprof \
|
||||||
--with-mmap \
|
--with-mmap \
|
||||||
--with-system-zlib \
|
--with-system-zlib \
|
||||||
--disable-lto \
|
|
||||||
--disable-plugins
|
|
||||||
|
|
||||||
make configure-host
|
make configure-host
|
||||||
make tooldir=/usr
|
make tooldir=/usr
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
--bindir=/usr/bin \
|
--bindir=/usr/bin \
|
||||||
--mandir=/usr/share/man \
|
--mandir=/usr/share/man \
|
||||||
--enable-ksh \
|
--enable-ksh \
|
||||||
--enable-sh
|
--enable-sh \
|
||||||
|
--enable-static
|
||||||
|
|
||||||
make
|
make
|
||||||
make DESTDIR="$1" install
|
make DESTDIR="$1" install
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
make
|
make CC='tcc -static'
|
||||||
install -Dm755 a.out "$1/usr/bin/awk"
|
install -Dm755 a.out "$1/usr/bin/awk"
|
||||||
install -Dm 755 awk.1 "$1/usr/share/man/man1/awk.1"
|
install -Dm 755 awk.1 "$1/usr/share/man/man1/awk.1"
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
export BUILD_ZLIB=0
|
export BUILD_ZLIB=0
|
||||||
export BUILD_BZIP2=0
|
export BUILD_BZIP2=0
|
||||||
export LDFLAGS="$LDFLAGS -static -fPIC -fno-lto -fno-use-linker-plugin -pthread"
|
export LDFLAGS="$LDFLAGS -pthread"
|
||||||
export CFLAGS="$CFLAGS -DNO_POSIX_2008_LOCALE -D_GNU_SOURCE"
|
export CFLAGS="$CFLAGS -DNO_POSIX_2008_LOCALE "
|
||||||
|
|
||||||
./Configure \
|
./Configure \
|
||||||
-des \
|
-des \
|
||||||
|
@ -15,7 +15,6 @@ export CFLAGS="$CFLAGS -DNO_POSIX_2008_LOCALE -D_GNU_SOURCE"
|
||||||
-Dusethreads \
|
-Dusethreads \
|
||||||
-Dinc_version_list=none \
|
-Dinc_version_list=none \
|
||||||
-Dd_sockaddr_in6=define \
|
-Dd_sockaddr_in6=define \
|
||||||
-Dcccdlflags=-fPIC \
|
|
||||||
-Dccflags="$CFLAGS" \
|
-Dccflags="$CFLAGS" \
|
||||||
-Dlddlflags="-shared $LDFLAGS" \
|
-Dlddlflags="-shared $LDFLAGS" \
|
||||||
-Dldflags="$LDFLAGS" \
|
-Dldflags="$LDFLAGS" \
|
||||||
|
|
|
@ -31,8 +31,7 @@ patch -p1 < posix-ptys.patch
|
||||||
--disable-vt52 \
|
--disable-vt52 \
|
||||||
--enable-luit \
|
--enable-luit \
|
||||||
--disable-screen-dumps \
|
--disable-screen-dumps \
|
||||||
--disable-ziconbeep \
|
--disable-ziconbeep
|
||||||
--with-Xaw3dxft
|
|
||||||
|
|
||||||
make
|
make
|
||||||
make DESTDIR="$1" install
|
make DESTDIR="$1" install
|
||||||
|
|
|
@ -17,5 +17,5 @@ libXt
|
||||||
libpng
|
libpng
|
||||||
libxcb
|
libxcb
|
||||||
netbsd-curses
|
netbsd-curses
|
||||||
libXaw3dXft
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
libXaw3dXft
|
|
||||||
autoconf make
|
autoconf make
|
||||||
automake make
|
automake make
|
||||||
libX11
|
libX11
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
autoconf make
|
autoconf make
|
||||||
automake make
|
automake make
|
||||||
editline
|
editline make
|
||||||
|
|
|
@ -8,6 +8,10 @@ sed -i 's/PREFIX= \/u/PREFIX= \/usr/' Makefile
|
||||||
sed 6a"DESTDIR= $1" Makefile > tmp.m
|
sed 6a"DESTDIR= $1" Makefile > tmp.m
|
||||||
mv tmp.m Makefile
|
mv tmp.m Makefile
|
||||||
|
|
||||||
|
# Allow for non-gcc compilers. Works with tcc!
|
||||||
|
sed -i 's/gcc/cc/g' Makefile
|
||||||
|
sed -i 's/CFLAGS=.*//' Makefile
|
||||||
|
|
||||||
make all install
|
make all install
|
||||||
|
|
||||||
#For some reason the generated image doesn't work.
|
#For some reason the generated image doesn't work.
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
for i in *.patch
|
||||||
|
do
|
||||||
|
patch -R -p1 < $i
|
||||||
|
done
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--cc="${CC:-cc}" \
|
--cc="${CC:-cc}" \
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
git git+git://repo.or.cz/tinycc.git
|
ef754d35719c5f28a7882b66d52e669c64ca4b6e0e4a745cdb1e0d61717f8e33
|
||||||
|
f6c1c1f2f5d12580c8777ec1bd87b5435b81a8d3bb2d8fc4bfd0d0515346c188
|
||||||
|
7e890dba972ff2666f7dbeea49a61ee2788c68f5cfef996bf92c080bea915e68
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
diff --git a/tcctools.c b/tcctools.c
|
||||||
|
index 4567b81..2bcc990 100644
|
||||||
|
--- a/tcctools.c
|
||||||
|
+++ b/tcctools.c
|
||||||
|
@@ -61,7 +61,7 @@ static int contains_any(const char *s, const char *list) {
|
||||||
|
}
|
||||||
|
|
||||||
|
static int ar_usage(int ret) {
|
||||||
|
- fprintf(stderr, "usage: tcc -ar [rcsv] lib file...\n");
|
||||||
|
+ fprintf(stderr, "usage: tcc -ar [rcsv] lib [file...]\n");
|
||||||
|
fprintf(stderr, "create library ([abdioptxN] not supported).\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
@@ -115,8 +115,9 @@ ST_FUNC int tcc_tool_ar(TCCState *s1, int argc, char **argv)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (!i_obj) // i_obj implies also i_lib. we require both.
|
||||||
|
+ if (!i_lib) // i_obj implies also i_lib.
|
||||||
|
ret = 1;
|
||||||
|
+ i_obj = i_obj ? i_obj : argc; // An empty archive will be generated if no input file is given
|
||||||
|
|
||||||
|
if (ret == 1)
|
||||||
|
return ar_usage(ret);
|
||||||
|
@@ -242,6 +243,11 @@ ST_FUNC int tcc_tool_ar(TCCState *s1, int argc, char **argv)
|
||||||
|
hofs++, fpos = 1;
|
||||||
|
// write header
|
||||||
|
fwrite("!<arch>\n", 8, 1, fh);
|
||||||
|
+ // create an empty archive
|
||||||
|
+ if (!funccnt) {
|
||||||
|
+ ret = 0;
|
||||||
|
+ goto the_end;
|
||||||
|
+ }
|
||||||
|
sprintf(stmp, "%-10d", (int)(strpos + (funccnt+1) * sizeof(int)));
|
||||||
|
memcpy(&arhdr.ar_size, stmp, 10);
|
||||||
|
fwrite(&arhdr, sizeof(arhdr), 1, fh);
|
|
@ -0,0 +1,50 @@
|
||||||
|
diff --git a/libtcc.c b/libtcc.c
|
||||||
|
index e00c776..1feb741 100644
|
||||||
|
--- a/libtcc.c
|
||||||
|
+++ b/libtcc.c
|
||||||
|
@@ -1335,6 +1335,8 @@ static int tcc_set_linker(TCCState *s, const char *option)
|
||||||
|
s->symbolic = 1;
|
||||||
|
} else if (link_option(option, "nostdlib", &p)) {
|
||||||
|
s->nostdlib = 1;
|
||||||
|
+ } else if (link_option(option, "e=", &p)) {
|
||||||
|
+ copy_linker_arg(&s->elf_entryname, p, 0);
|
||||||
|
} else if (link_option(option, "fini=", &p)) {
|
||||||
|
copy_linker_arg(&s->fini_symbol, p, 0);
|
||||||
|
ignoring = 1;
|
||||||
|
diff --git a/tcc.h b/tcc.h
|
||||||
|
index 8a46210..1ea1856 100644
|
||||||
|
--- a/tcc.h
|
||||||
|
+++ b/tcc.h
|
||||||
|
@@ -961,6 +961,8 @@ struct TCCState {
|
||||||
|
Section *verneed_section;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+ char *elf_entryname;
|
||||||
|
+
|
||||||
|
#ifdef TCC_IS_NATIVE
|
||||||
|
const char *runtime_main;
|
||||||
|
void **runtime_mem;
|
||||||
|
diff --git a/tccelf.c b/tccelf.c
|
||||||
|
index 1dcbc38..9e860b5 100644
|
||||||
|
--- a/tccelf.c
|
||||||
|
+++ b/tccelf.c
|
||||||
|
@@ -2322,11 +2322,17 @@ static void tcc_output_elf(TCCState *s1, FILE *f, int phnum, ElfW(Phdr) *phdr,
|
||||||
|
default:
|
||||||
|
case TCC_OUTPUT_EXE:
|
||||||
|
ehdr.e_type = ET_EXEC;
|
||||||
|
- ehdr.e_entry = get_sym_addr(s1, "_start", 1, 0);
|
||||||
|
+ ehdr.e_entry = get_sym_addr(s1,
|
||||||
|
+ s1->elf_entryname ?
|
||||||
|
+ s1->elf_entryname : "_start",
|
||||||
|
+ 1, 0);
|
||||||
|
break;
|
||||||
|
case TCC_OUTPUT_DLL:
|
||||||
|
ehdr.e_type = ET_DYN;
|
||||||
|
- ehdr.e_entry = text_section->sh_addr; /* XXX: is it correct ? */
|
||||||
|
+ ehdr.e_entry = s1->elf_entryname ?
|
||||||
|
+ get_sym_addr(s1,s1->elf_entryname,1,0) :
|
||||||
|
+ text_section->sh_addr;
|
||||||
|
+ /* XXX: is it correct ? */
|
||||||
|
break;
|
||||||
|
case TCC_OUTPUT_OBJ:
|
||||||
|
ehdr.e_type = ET_REL;
|
|
@ -0,0 +1,26 @@
|
||||||
|
diff --git a/i386-asm.h b/i386-asm.h
|
||||||
|
index 65d5179..dfc5183 100644
|
||||||
|
--- a/i386-asm.h
|
||||||
|
+++ b/i386-asm.h
|
||||||
|
@@ -447,6 +447,8 @@ ALT(DEF_ASM_OP2(psrlq, 0x0f73, 2, OPC_MODRM, OPT_IM8, OPT_MMXSSE ))
|
||||||
|
DEF_ASM_OP2(pxor, 0x0fef, 0, OPC_MODRM, OPT_EA | OPT_MMXSSE, OPT_MMXSSE )
|
||||||
|
|
||||||
|
/* sse */
|
||||||
|
+ DEF_ASM_OP1(ldmxcsr, 0x0fae, 2, OPC_MODRM, OPT_EA)
|
||||||
|
+ DEF_ASM_OP1(stmxcsr, 0x0fae, 3, OPC_MODRM, OPT_EA)
|
||||||
|
DEF_ASM_OP2(movups, 0x0f10, 0, OPC_MODRM, OPT_EA | OPT_REG32, OPT_SSE )
|
||||||
|
ALT(DEF_ASM_OP2(movups, 0x0f11, 0, OPC_MODRM, OPT_SSE, OPT_EA | OPT_REG32 ))
|
||||||
|
DEF_ASM_OP2(movaps, 0x0f28, 0, OPC_MODRM, OPT_EA | OPT_REG32, OPT_SSE )
|
||||||
|
diff --git a/x86_64-asm.h b/x86_64-asm.h
|
||||||
|
index cb9eb16..4e03773 100644
|
||||||
|
--- a/x86_64-asm.h
|
||||||
|
+++ b/x86_64-asm.h
|
||||||
|
@@ -483,6 +483,8 @@ ALT(DEF_ASM_OP2(psrlq, 0x0f73, 2, OPC_MODRM, OPT_IM8, OPT_MMXSSE ))
|
||||||
|
DEF_ASM_OP2(pxor, 0x0fef, 0, OPC_MODRM, OPT_EA | OPT_MMXSSE, OPT_MMXSSE )
|
||||||
|
|
||||||
|
/* sse */
|
||||||
|
+ DEF_ASM_OP1(ldmxcsr, 0x0fae, 2, OPC_MODRM, OPT_EA)
|
||||||
|
+ DEF_ASM_OP1(stmxcsr, 0x0fae, 3, OPC_MODRM, OPT_EA)
|
||||||
|
DEF_ASM_OP2(movups, 0x0f10, 0, OPC_MODRM, OPT_EA | OPT_REG32, OPT_SSE )
|
||||||
|
ALT(DEF_ASM_OP2(movups, 0x0f11, 0, OPC_MODRM, OPT_SSE, OPT_EA | OPT_REG32 ))
|
||||||
|
DEF_ASM_OP2(movaps, 0x0f28, 0, OPC_MODRM, OPT_EA | OPT_REG32, OPT_SSE )
|
|
@ -1 +1,4 @@
|
||||||
git+git://repo.or.cz/tinycc.git
|
git+git://repo.or.cz/tinycc.git
|
||||||
|
patches/empty_archive.patch
|
||||||
|
patches/linker_option_entry.patch
|
||||||
|
patches/mxcsr.patch
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
libXaw3dXft
|
|
||||||
autoconf make
|
autoconf make
|
||||||
automake make
|
automake make
|
||||||
xorg-util-macros make
|
xorg-util-macros make
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
patch -p1 < ttf.patch
|
|
||||||
|
|
||||||
./autogen.sh \
|
./autogen.sh \
|
||||||
--prefix=/usr
|
--prefix=/usr
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
libXaw3dXft
|
|
||||||
autoconf make
|
autoconf make
|
||||||
automake make
|
automake make
|
||||||
libX11
|
libX11
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
libXaw3dXft
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
libXaw3dXft
|
|
||||||
autoconf make
|
autoconf make
|
||||||
automake make
|
automake make
|
||||||
libX11
|
libX11
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
libXaw3dXft
|
|
||||||
autoconf make
|
autoconf make
|
||||||
automake make
|
automake make
|
||||||
libX11
|
libX11
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
patch -p1 < ttf.patch
|
|
||||||
|
|
||||||
./autogen.sh \
|
./autogen.sh \
|
||||||
--prefix=/usr
|
--prefix=/usr
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
libXaw3dXft
|
|
||||||
autoconf make
|
autoconf make
|
||||||
automake make
|
automake make
|
||||||
libX11
|
libX11
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
libXaw3dXft
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
patch -p1 < ttf.patch
|
|
||||||
|
|
||||||
for autojunk in aclocal.m4 Makefile.am Makefile.in
|
for autojunk in aclocal.m4 Makefile.am Makefile.in
|
||||||
do
|
do
|
||||||
touch $autojunk
|
touch $autojunk
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
libXaw3dXft
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
libXaw3dXft
|
|
||||||
autoconf make
|
autoconf make
|
||||||
automake make
|
automake make
|
||||||
libICE
|
libICE
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr
|
--prefix=/usr \
|
||||||
|
--enable-static
|
||||||
|
|
||||||
make DESTDIR="$1" install
|
make DESTDIR="$1" CFLAGS="$CFLAGS -static" install
|
||||||
ln -s /usr/bin/dash "$1/usr/bin/sh"
|
ln -s /usr/bin/dash "$1/usr/bin/sh"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
2c65b01747580bca01d42ea23d2ec662b1fa6bc1419e5a9e256e22cf42907f86
|
a1e8d0a09c01e9054b36ef7625e3cb562e54b25a5aab817e3b3e2e6e65f39911
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
libXaw3dXft
|
|
||||||
ghostscript
|
ghostscript
|
||||||
freetype-harfbuzz
|
freetype-harfbuzz
|
||||||
libICE
|
libICE
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f
|
01b2278b2426c4de0ee7ddc6e6352b050b6d4f05c2f385c93d58357a67818e3e
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
https://fossies.org/linux/www/libxslt-1.1.34.tar.gz
|
https://fossies.org/linux/www/libxslt-1.1.37.tar.bz2
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1.1.34 1
|
1.1.37 1
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
prefix=/usr
|
|
||||||
exec_prefix=${prefix}
|
|
||||||
libdir=${exec_prefix}/lib
|
|
||||||
includedir=${prefix}/include
|
|
||||||
|
|
||||||
Name: Xaw
|
|
||||||
Description: X Athena Widgets Library, version 7
|
|
||||||
Version: 1.0.13
|
|
||||||
Requires: xproto xt
|
|
||||||
Requires.private: x11 xext xt xmu xpm
|
|
||||||
Cflags: -I${includedir}
|
|
||||||
Libs: -L${libdir} -lneXtaw
|
|
|
@ -1,4 +1,4 @@
|
||||||
libXaw3dXft
|
|
||||||
libICE
|
libICE
|
||||||
libSM
|
libSM
|
||||||
libX11
|
libX11
|
||||||
|
|
|
@ -6,5 +6,8 @@ CFLAGS='-O2 -w -pipe'
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--enable-native
|
--enable-native
|
||||||
|
|
||||||
|
ln -s /bin/true ./strip
|
||||||
|
export PATH="$PWD:$PATH"
|
||||||
|
|
||||||
make
|
make
|
||||||
make DESTDIR="$1" install
|
make DESTDIR="$1" install
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
b2025588421ff26f92548cb4ead3ecec73347b7a17ff4da7352a7c00ba1e1308
|
9960c25138fec5eebe3529f3acb466b35c06397e5e07cf67a0958727fe3153b3
|
||||||
|
|
|
@ -17,4 +17,4 @@ libfontenc
|
||||||
libxcb
|
libxcb
|
||||||
libxkbfile
|
libxkbfile
|
||||||
mesa
|
mesa
|
||||||
libXaw3dXft
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
libXaw3dXft
|
|
||||||
gccmakedep-git make
|
gccmakedep-git make
|
||||||
imake-git make
|
imake-git make
|
||||||
xorg-cf-git make
|
xorg-cf-git make
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
libXaw3dXft
|
|
||||||
libICE
|
libICE
|
||||||
libSM
|
libSM
|
||||||
libX11
|
libX11
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
libXaw3dXft
|
|
||||||
libXdmcp
|
libXdmcp
|
||||||
libXpm
|
libXpm
|
||||||
xrdb
|
xrdb
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
chmod +rw *
|
chmod +rw *
|
||||||
patch -p1 < errors.patch
|
patch -p1 < errors.patch
|
||||||
chmod +rw *
|
chmod +rw *
|
||||||
patch -p1 < ttf.patch
|
|
||||||
|
|
||||||
make
|
make
|
||||||
make DESTDIR="$1" install
|
make DESTDIR="$1" install
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
fontconfig
|
fontconfig
|
||||||
freetype-harfbuzz
|
freetype-harfbuzz
|
||||||
libX11
|
libX11
|
||||||
libXaw3dXft
|
|
||||||
libXft
|
libXft
|
||||||
libXmu
|
libXmu
|
||||||
libXt
|
libXt
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
libXaw3dXft
|
|
||||||
xbitmaps make
|
xbitmaps make
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
libXtst
|
libXtst
|
||||||
libXaw3dXft
|
|
||||||
|
|
Loading…
Reference in New Issue