Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Align linux libelf config with other platforms
Gabe Schrecker committed 4 years ago
commit 470713169bb118f4bc6916a776840c5a49ed4f38
parent 1380990
3 files changed +0 -53
modified .gitignore
@@ -63,7 +63,6 @@ scripts/sbin/pkg2ng
/external/libelf/libelf_convert.c
/external/libelf/libelf_fsize.c
/external/libelf/libelf_msize.c
-
/external/libelf/native-elf-format.h
/libpkg/Makefile
/libpkg/repo/Makefile
/libpkg/repo/binary/Makefile
modified external/libelf/Makefile.autosetup
@@ -61,8 +61,6 @@ SRCS= elf_begin.c \

LOCAL_CFLAGS=	-I$(top_srcdir)/external/libelf -I$(top_builddir)/external/libelf

-
$(SRCS): native-elf-format.h
-

libelf_fsize.c: libelf_fsize.m4 elf_types.m4
	m4 -D SRCDIR=$(top_srcdir)/external/libelf $(top_srcdir)/external/libelf/elf_types.m4 $(top_srcdir)/external/libelf/libelf_fsize.m4 > $@

@@ -72,8 +70,5 @@ libelf_convert.c: libelf_convert.m4 elf_types.m4
libelf_msize.c: libelf_msize.m4 elf_types.m4
	@m4 -D SRCDIR=$(top_srcdir)/external/libelf $(top_srcdir)/external/libelf/elf_types.m4 $(top_srcdir)/external/libelf/libelf_msize.m4 > $@

-
native-elf-format.h:
-
	LANG=C $(top_srcdir)/external/libelf/native-elf-format > $@
-


include $(MK)/static-lib.mk
deleted external/libelf/native-elf-format
@@ -1,47 +0,0 @@
-
#!/bin/sh
-
#
-
# $Id$
-
#
-
# Find the native ELF format for a host platform by compiling a
-
# test object and examining the resulting object.
-
#
-
# This script is used if there is no easy way to determine this
-
# information statically at compile time.
-

-
program=`basename $0`
-
tmp_c=`mktemp -u nefXXXXXX`.c
-
tmp_o=`echo ${tmp_c} | sed -e 's/.c$/.o/'`
-

-
trap "rm -f ${tmp_c} ${tmp_o}"	0 1 2 3 15
-

-
touch ${tmp_c}
-

-
echo "/* Generated by ${program} on `date` */"
-

-
cc -c ${tmp_c} -o ${tmp_o}
-
readelf -h ${tmp_o} | awk '
-
$1 ~ "Class:" {
-
        sub("ELF","",$2); elfclass = $2;
-
    }
-
$1 ~ "Data:"  {
-
        if (match($0, "little")) {
-
            elfdata = "LSB";
-
 	} else {
-
            elfdata = "MSB";
-
	}
-
    }
-
$1 ~ "Machine:" {
-
        if (match($0, "Intel.*386")) {
-
            elfarch = "EM_386";
-
        } else if (match($0, ".*X86-64")) {
-
            elfarch = "EM_X86_64";
-
        } else {
-
            elfarch = "unknown";
-
        }
-
    }
-
END {
-
    printf("#define	ELFTC_CLASS	ELFCLASS%s\n", elfclass);
-
    printf("#define	ELFTC_ARCH	%s\n", elfarch);
-
    printf("#define	ELFTC_BYTEORDER	ELFDATA2%s\n", elfdata);
-
}'
-