Merge pull request #83 from stikonas/binutils

binutils: remove autogen'ed files
This commit is contained in:
fosslinux 2021-04-02 12:38:22 +11:00 committed by GitHub
commit dcec416d0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 35 deletions

View File

@ -6,7 +6,7 @@
src_prepare() {
default_src_prepare
rm configure
rm configure Makefile.in
# Rebuild aclocal.m4 files
# aclocal.m4 in libiberty seems to be hand-written
@ -56,8 +56,6 @@ src_prepare() {
libtoolize
cp ${PREFIX}/share/aclocal/libtool.m4 aclocal.m4
autoconf-2.13
# automake errors out without this
cd gas
mv config/m68k-parse.y .
@ -92,31 +90,46 @@ src_prepare() {
}
src_configure() {
AR="tcc -ar" RANLIB="true" CC="tcc -D __GLIBC_MINOR__=6" \
# TODO: Find a way to avoid these hacks
sed -i '/#undef pid_t/d' libiberty/config.in
sed -i '/#undef uintptr_t/d' libiberty/config.in
sed -i '/NEED_DECLARATION_SBRK/d' binutils/config.in
for dir in bfd opcodes binutils gas ld; do
sed -i '/#undef size_t/d' ${dir}/config.in
sed -i '/#undef off_t/d' ${dir}/config.in
done
sed -i 's/C_alloca/alloca/g' libiberty/alloca.c
sed -i 's/C_alloca/alloca/g' include/libiberty.h
for dir in intl libiberty opcodes bfd binutils gas gprof ld; do
cd $dir
LD="true" AR="tcc -ar" RANLIB="true" CC="tcc -D __GLIBC_MINOR__=6 -DHAVE_SBRK=1" \
./configure \
--disable-nls \
--disable-shared \
--disable-werror \
--build=i386-unknown-linux \
--host=i386-unknown-linux \
--target=i386-unknown-linux \
--with-sysroot=/after \
--build=i386-unknown-linux-gnu \
--host=i386-unknown-linux-gnu \
--target=i386-unknown-linux-gnu \
--with-sysroot="${PREFIX}" \
--disable-64-bit-bfd \
--prefix="${PREFIX}" \
--libdir="${PREFIX}/lib/musl"
# TODO: Find a way to avoid these hacks
sed -i '/#undef pid_t/d' libiberty/config.in
sed -i '/#undef uintptr_t/d' libiberty/config.in
sed -i 's/C_alloca/alloca/g' libiberty/alloca.c
sed -i 's/C_alloca/alloca/g' include/libiberty.h
--libdir="${PREFIX}/lib/musl" \
--srcdir=.
cd ..
done
}
src_compile() {
# Rebuild generated header files. bfd/Makefile does not exists at this stage,
# so we need to create it first.
make configure-bfd
make -C bfd headers
default_src_compile
for dir in libiberty bfd opcodes binutils gas gprof ld; do
make -C $dir
done
}
src_install() {
for dir in libiberty bfd opcodes binutils gas gprof ld; do
make -C $dir install
done
}

View File

@ -1,19 +1,19 @@
9d04d6617616fe5cb2cfb3fbc32b9fe9ab891a8f21ecf5fbf9e9570831826ef4 /after/bin/addr2line
8ac5f9c6281a4272bb5329b5d3b73bb744102b0e9c6964ebd5fbc893e56d866f /after/bin/ar
6dc5bf6e40feacd8ea20e7a8a3ded12fe37c2848b6023f284d22e89db09b101f /after/bin/as
4eae20278831c452f01d4a7dde2a795e9e1c0ab60f9d32590c8d77e98a33b39e /after/bin/c++filt
c70b11d11aaebefb92d08e61a18c2a79eb78f63add3a62c2b31fd73d394430ed /after/bin/gprof
20f10bddc981e797943980195794fdb19bfaf679be49c2e1236f0522ed9c07aa /after/bin/ld
e4409a21081ec94abda6c749a9791f68a5bdc35ee77093abb608cf7beefa8020 /after/bin/nm
97fcc442ec3785b1413133c2b4f528a005aa927a4e54f955bc17a07df620f189 /after/bin/objcopy
3d7a99f65f51aca2ec4c526683740637586c9321cf43fc0fc561955615c4d7ad /after/bin/objdump
06469ed23d6ff221d106de842a90676596e3a3267b20496c6914bf1b64a765cc /after/bin/addr2line
cc5cbb08ad94e0d9aca228aa2afc57872d08fad2820137e22e614aff604a4396 /after/bin/ar
f0815d1f99c4422c5265e3e8bf00600b767085283378ee4ee447ffd1991ee99b /after/bin/as
0bdb378a1e983f782947cfca167aac1944c4966df2e4c8c97fdfce3ef46f9732 /after/bin/c++filt
aaf00cc607ddf2d3e87d85afc2c8e753b3ea537e591a5467b67731507af56440 /after/bin/gprof
7a0d79b64c26799d570998b71ece71ca86a471500681dea4a3975f1755774276 /after/bin/ld
0c9a94afc30114623dfcc2356e508bbec315026444ec07bb3a60ad2f4105e736 /after/bin/nm
d9086dad59a82585b20c129c170aa095ddbd81c9d6cb525fea1d455c85faeddc /after/bin/objcopy
53059d9c3994739d63825ae6ebba60728a82de3a28d2b586e00c9661ed75648d /after/bin/objdump
e49bba1ea6a61fb90f754e8de4692ed0810e7c68429f0b22fbf37670607a7807 /after/bin/od
530d1747439ab516ad010d170e2f56ebe2b2049043fb3d5e18a4234b04b96e5c /after/bin/ranlib
765866eaf22b3302d30712829ee56f2edaf842e7b07c7c4cd8a5fa19a2384769 /after/bin/ranlib
978d6cf91009703d14aa2c678b0fd90fa7e417dc4ade9c151986a56bca98a79a /after/bin/readelf
9d1b1179b67279109e9648368a8ffedd71fdd1c21857ee77058192b0f1dbaeba /after/bin/size
82657d370bca61bf6a6a4cbfb621614582519f2e938be1a4d09c135344c7c889 /after/bin/strings
fe6eaa5cf6e6621356fff3cd047c7cd0051490e895915027b6d4439159707f36 /after/bin/strip
f5934b4f057018b7f14adc197460d8b238cff80294234d771a17a408d5794104 /after/lib/musl/libbfd.a
36584f00878e759a5a9c500e2884e971e98c194f44a0282a7cccf390b9541138 /after/bin/size
32313abb11d0cbc51d6dddfb04de1de5b72df6f1bbe17ec53b775a6bcb41e9fd /after/bin/strings
8f881e2202d90a023372ee362d47237bc8821bd1e75983d69236b41ffc4f5c89 /after/bin/strip
02a50a78871951e6d6ea5c68cf0abbf6da913d9e1fe7d66c05d3cc3cb6577f8a /after/lib/musl/libbfd.a
cd472e56e7e9276e2d6eea4b0aecd068cdbbd7d767dd913e7d72e43457f6405a /after/lib/musl/libbfd.la
61a03b0d2eafa5ad50242a7ee8ce8664c2ef342bf727f46ceab8999b61a9a61b /after/lib/musl/libiberty.a
6530574bde4f5c57b194ae4229efb9784a97cc89cd45fc0d852e9afb5e103e4f /after/lib/musl/libopcodes.a