4 rm -f sizeof
*.o sizeof-glibc sizeof-musl sizeof.diff tab_
*.html
7 MUSL
=$(MUSL
) .
/update.sh
8 abi
: data
/abi_type.x86_64.musl data
/abi_func.x86_64.musl
10 abi_type.x86_64.
cc abi_func.
cc: tables
12 data
/abi_type.x86_64.musl
: abi_type.x86_64.
cc
13 CXX
=g
++ .
/abi_type_data.sh
>$@
14 data
/abi_func.x86_64.musl
: abi_func.
cc
15 CXX
=g
++ .
/abi_func_data.sh
>$@
18 sizeof
: sizeof-glibc sizeof-musl
19 .
/sizeof-glibc
>data
/sizeof.ARCH.glibc
20 .
/sizeof-musl
>data
/sizeof.ARCH.musl
21 diff
-U1 data
/sizeof.ARCH.glibc data
/sizeof.ARCH.musl
>data
/sizeof.ARCH.diff || true
23 LIBGCC
=`gcc -print-file-name=libgcc.a |sed 's,/libgcc.a$$,,'`
24 # when compiling with pcc
25 #PCC=`pcc -v foobar.o 2>&1 |sed -n 's,.* \([^ ]*\)/lib/crtbegin.o.*,\1,p'`
30 sizeof-glibc
: sizeof.c
31 gcc
-std
=gnu99
-o
$@
$<
33 gcc
-std
=gnu99
-nostdinc
-fno-stack-protector
-isystem
$(MUSL
)/include -isystem
$(LIBGCC
) -isystem
/usr
/include -c
-o
$@.o
$<
34 ld -o
$@
$@.o
-X
-d
-e _start
-Bstatic
$(MUSL
)/lib
/crti.o
$(MUSL
)/lib
/crt1.o
$(MUSL
)/lib
/crtn.o
-L
$(MUSL
)/lib
-lc
-L
$(LIBGCC
) -lgcc
-nostdlib
35 # ld -o $@ $@.o $(MUSL)/lib/crti.o $(MUSL)/lib/crt1.o $(MUSL)/lib/crtn.o -L$(MUSL)/lib -lc -dynamic-linker $(MUSL)/lib/libc.so -L$(LIBGCC) -lgcc -nostdlib
36 # pcc -nostdinc -isystem $(MUSL)/include -isystem $(PCC)/include -c -o $@.o $<
37 # ld -X -d -e _start -Bstatic -o $@ $@.o $(MUSL)/lib/crti.o $(MUSL)/lib/crt1.o $(PCC)/lib/crtbegin.o $(PCC)/lib/crtend.o -L$(MUSL)/lib -lc -L$(PCC)/lib -lpcc -nostdlib
40 g
++ -std
=gnu99
-nostdinc
-fno-stack-protector
-isystem
$(MUSL
)/include -isystem
$(LIBGCC
) -isystem
/usr
/include -c
-o
$@.o
$<
41 ld -o
$@
$@.o
-X
-d
-e _start
-Bstatic
$(MUSL
)/lib
/crti.o
$(MUSL
)/lib
/crt1.o
$(MUSL
)/lib
/crtn.o
-L
$(MUSL
)/lib
-lc
-L
$(LIBGCC
) -lgcc
-nostdlib
48 abi.ARCH.glibc
: abi_type.
cc
49 g
++ -std
=c
++11 $(GLIBC_FLAGS
) -c
-o
$@.o
$<
50 nm
-C
$@.o |sed
-n
's/^[[:xdigit:]]* T //p' |
sort >$@
51 abi.ARCH.musl
: abi_type.
cc
52 g
++ -std
=c
++11 -nostdinc
-fno-stack-protector
-isystem
$(MUSL
)/include -isystem
$(LIBGCC
) -isystem
/usr
/include -c
-o
$@.o
$<
53 nm
-C
$@.o |sed
-n
's/^[[:xdigit:]]* T //p' |
sort >$@
54 abi.ARCH.diff
: abi.ARCH.glibc abi.ARCH.musl
55 diff
-U0
$^
>$@ || true