Skip to content

Commit

Permalink
package/elfutils: enable on musl
Browse files Browse the repository at this point in the history
Buildroot commit eb60820 disabled
elfutils for musl toolchains in 2015. Current code builds fine with musl
so remove the exceptions.

Signed-off-by: Bernd Kuhls <[email protected]>
[[email protected]:
  - move all libc-related conditional blocks together
]
Signed-off-by: Yann E. MORIN <[email protected]>
  • Loading branch information
bkuhls authored and yann-morin-1998 committed Oct 22, 2023
1 parent d8bcff6 commit bf9583a
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 50 deletions.
6 changes: 2 additions & 4 deletions package/avrdude/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ config BR2_PACKAGE_AVRDUDE
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_WCHAR # elfutils
depends on !BR2_STATIC_LIBS # elfutils
depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb
select BR2_PACKAGE_ELFUTILS
select BR2_PACKAGE_LIBUSB
Expand All @@ -27,7 +26,6 @@ comment "SPI support needs a toolchain w/ linux headers >= 4.8"

endif

comment "avrdude needs a uClibc or glibc toolchain w/ threads, wchar, dynamic library, gcc >= 4.9"
comment "avrdude needs a toolchain w/ threads, wchar, dynamic library, gcc >= 4.9"
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR \
|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 \
|| !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC)
|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
4 changes: 1 addition & 3 deletions package/bpftool/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,17 @@ config BR2_PACKAGE_BPFTOOL
depends on BR2_USE_WCHAR # binutils, elfutils
depends on !BR2_STATIC_LIBS # elfutils
depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils
depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
select BR2_PACKAGE_BINUTILS
select BR2_PACKAGE_ELFUTILS
help
bpftool is a tool for for inspection and simple manipulation
of eBPF programs and maps.

comment "bpftool needs a uClibc or glibc toolchain w/ wchar, dynamic library, threads, headers >= 4.12"
comment "bpftool needs a toolchain w/ wchar, dynamic library, threads, headers >= 4.12"
depends on BR2_PACKAGE_BPFTOOL_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on !BR2_nios2
depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS \
|| !BR2_TOOLCHAIN_HAS_THREADS \
|| !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC) \
|| !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
9 changes: 3 additions & 6 deletions package/elfutils/Config.in
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
comment "elfutils needs a uClibc or glibc toolchain w/ wchar, dynamic library, threads"
comment "elfutils needs a toolchain w/ wchar, dynamic library, threads"
depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS \
|| !BR2_TOOLCHAIN_HAS_THREADS \
|| !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC)
|| !BR2_TOOLCHAIN_HAS_THREADS

config BR2_PACKAGE_ELFUTILS
bool "elfutils"
depends on BR2_USE_WCHAR
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HAS_THREADS
# Only glibc and uClibc implement the myriad of required GNUisms
depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC
select BR2_PACKAGE_ZLIB
select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC
select BR2_PACKAGE_ARGP_STANDALONE if !BR2_TOOLCHAIN_USES_GLIBC
select BR2_PACKAGE_MUSL_FTS if !BR2_TOOLCHAIN_USES_GLIBC
help
Libraries/utilities to handle ELF objects (drop in
Expand Down
11 changes: 5 additions & 6 deletions package/elfutils/elfutils.mk
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,21 @@ ELFUTILS_LDFLAGS += -latomic
endif

ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),)
ELFUTILS_DEPENDENCIES += musl-fts
ELFUTILS_DEPENDENCIES += musl-fts argp-standalone
ELFUTILS_LDFLAGS += -lfts
endif

ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
ELFUTILS_CONF_OPTS += --disable-symbol-versioning
endif

# disable for now, needs "distro" support
ELFUTILS_CONF_OPTS += --disable-libdebuginfod --disable-debuginfod
HOST_ELFUTILS_CONF_OPTS += --disable-libdebuginfod --disable-debuginfod

ELFUTILS_CONF_ENV += \
LDFLAGS="$(ELFUTILS_LDFLAGS)"

ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
ELFUTILS_DEPENDENCIES += argp-standalone
ELFUTILS_CONF_OPTS += --disable-symbol-versioning
endif

ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
ELFUTILS_CONF_OPTS += --enable-demangler
else
Expand Down
6 changes: 2 additions & 4 deletions package/kexec-lite/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ config BR2_PACKAGE_KEXEC_LITE
depends on !BR2_STATIC_LIBS # dtc, elfutils
depends on BR2_USE_WCHAR # elfutils
depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils
depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils
select BR2_PACKAGE_ELFUTILS
select BR2_PACKAGE_DTC
select BR2_PACKAGE_DTC_PROGRAMS
Expand All @@ -18,8 +17,7 @@ config BR2_PACKAGE_KEXEC_LITE

https://github.com/antonblanchard/kexec-lite

comment "kexec-lite needs a uClibc or glibc toolchain w/ wchar, dynamic library, threads"
comment "kexec-lite needs a toolchain w/ wchar, dynamic library, threads"
depends on BR2_powerpc || BR2_powerpc64
depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR \
|| !BR2_TOOLCHAIN_HAS_THREADS \
|| !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC)
|| !BR2_TOOLCHAIN_HAS_THREADS
6 changes: 2 additions & 4 deletions package/kmemd/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ config BR2_PACKAGE_KMEMD
depends on !BR2_STATIC_LIBS # libbpf
depends on BR2_TOOLCHAIN_HAS_THREADS # libbpf
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_14
depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # libbpf
select BR2_PACKAGE_LIBBPF
help
Explore a live Linux kernel's memory using GDB

https://github.com/wkz/kmemd

comment "kmemd needs a uClibc or glibc toolchain w/ wchar, dynamic library, threads, headers >= 5.14"
comment "kmemd needs a toolchain w/ wchar, dynamic library, threads, headers >= 5.14"
depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS \
|| !BR2_TOOLCHAIN_HAS_THREADS \
|| !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13 \
|| !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC)
|| !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
6 changes: 2 additions & 4 deletions package/libbpf/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ config BR2_PACKAGE_LIBBPF
depends on !BR2_STATIC_LIBS # elfutils
depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils
select BR2_PACKAGE_ELFUTILS
select BR2_PACKAGE_ZLIB
help
Expand All @@ -16,9 +15,8 @@ config BR2_PACKAGE_LIBBPF

https://github.com/libbpf/libbpf

comment "libbpf needs a uClibc or glibc toolchain w/ wchar, dynamic library, threads, headers >= 4.13"
comment "libbpf needs a toolchain w/ wchar, dynamic library, threads, headers >= 4.13"
depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS \
|| !BR2_TOOLCHAIN_HAS_THREADS \
|| !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13 \
|| !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC)
|| !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
6 changes: 2 additions & 4 deletions package/ltrace/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ config BR2_PACKAGE_LTRACE
depends on BR2_USE_WCHAR # elfutils
depends on !BR2_STATIC_LIBS # elfutils
depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils
depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils
depends on BR2_PACKAGE_LTRACE_ARCH_SUPPORTS
select BR2_PACKAGE_ELFUTILS
help
Expand All @@ -26,8 +25,7 @@ config BR2_PACKAGE_LTRACE

http://ltrace.org

comment "ltrace needs a uClibc or glibc toolchain w/ wchar, dynamic library, threads"
comment "ltrace needs a toolchain w/ wchar, dynamic library, threads"
depends on BR2_PACKAGE_LTRACE_ARCH_SUPPORTS
depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS \
|| !BR2_TOOLCHAIN_HAS_THREADS \
|| !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC)
|| !BR2_TOOLCHAIN_HAS_THREADS
8 changes: 0 additions & 8 deletions package/mesa3d/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
depends on BR2_USE_MMU # libdrm
depends on BR2_i386 || BR2_x86_64
depends on BR2_PACKAGE_MESA3D_LLVM
depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
select BR2_PACKAGE_LIBDRM_AMDGPU
select BR2_PACKAGE_LIBDRM_RADEON
Expand All @@ -211,13 +210,6 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
help
Driver for ATI/AMD Radeon HD7000/HD8000/Rx200 GPUs.

# Radeon SI needs libelf
# musl is not currently compatible with elfutils
comment "Radeon SI driver needs a uClibc or glibc toolchain"
depends on BR2_USE_MMU
depends on BR2_PACKAGE_MESA3D_LLVM
depends on !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC)

config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA
bool "Gallium vmware svga driver"
depends on BR2_i386 || BR2_x86_64
Expand Down
4 changes: 1 addition & 3 deletions package/petitboot/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ config BR2_PACKAGE_PETITBOOT
depends on BR2_USE_WCHAR # elfutils
depends on !BR2_STATIC_LIBS # elfutils, lvm2
depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils, lvm2
depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils
depends on BR2_PACKAGE_HAS_UDEV
select BR2_PACKAGE_ELFUTILS
select BR2_PACKAGE_LVM2 # devmapper
Expand All @@ -22,10 +21,9 @@ config BR2_PACKAGE_PETITBOOT

http://www.kernel.org/pub/linux/kernel/people/geoff/petitboot/petitboot.html

comment "petitboot needs a uClibc or glibc toolchain w/ wchar, dynamic library, threads, udev /dev management"
comment "petitboot needs a toolchain w/ wchar, dynamic library, threads, udev /dev management"
depends on BR2_PACKAGE_KEXEC_ARCH_SUPPORTS
depends on BR2_USE_MMU
depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS || \
BR2_TOOLCHAIN_HAS_THREADS || \
!(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC) || \
!BR2_PACKAGE_HAS_UDEV
6 changes: 2 additions & 4 deletions package/racehound/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ config BR2_PACKAGE_RACEHOUND
depends on BR2_USE_WCHAR # elfutils
depends on !BR2_STATIC_LIBS # elfutils
depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils
depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils
# only x86/x86_64 supported
depends on BR2_i386 || BR2_x86_64
select BR2_PACKAGE_ELFUTILS
Expand All @@ -30,8 +29,7 @@ comment "racehound needs an Linux kernel >= 3.14 to be built"
depends on !BR2_LINUX_KERNEL
depends on BR2_i386 || BR2_x86_64

comment "racehound needs a uClibc or glibc toolchain w/ C++, wchar, dynamic library, threads"
comment "racehound needs a toolchain w/ C++, wchar, dynamic library, threads"
depends on BR2_i386 || BR2_x86_64
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || BR2_STATIC_LIBS \
|| !BR2_TOOLCHAIN_HAS_THREADS \
|| !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC)
|| !BR2_TOOLCHAIN_HAS_THREADS

0 comments on commit bf9583a

Please sign in to comment.