Add patchelf to tools

This commit is contained in:
deadwood 2022-02-20 11:42:06 +01:00
parent f4dfc139e1
commit 961b1ca3a9
6 changed files with 5465 additions and 1 deletions

View File

@ -163,7 +163,7 @@ tools : makedirs gdbinit mmake $(GENMFSCRIPT) $(ARCHTOOL) $(ELF2HUNK) \
$(FLEXCAT) $(CREATEDTDESC) \
$(ILBMTOC) $(ILBMTOICON) $(INFOINFO) \
$(COLLECT-AROS) $(AFSLIB) $(COPYTOAFS) \
$(FD2INLINE) $(FD2PRAGMA) $(SFDC) $(SETREV) $(PARSEOFFSETS)
$(FD2INLINE) $(FD2PRAGMA) $(SFDC) $(SETREV) $(PARSEOFFSETS) $(PATCHELF)
@$(NOP)
# rebuild the crosstools if we are reconfigured, or its dependencies change.
@ -255,6 +255,11 @@ $(SETREV): $(SRCDIR)/tools/setrev/setrev.c
@$(ECHO) Building setrev...
@$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/setrev SRCDIR=$(SRCDIR) TOP=$(TOP)
$(PATCHELF): $(SRCDIR)/tools/patchelf/patchelf.cc
@$(ECHO) Building patchelf...
@$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/patchelf SRCDIR=$(SRCDIR) TOP=$(TOP)
# MetaMake apparently requires a slighty different compilation. Probably
# because it is sort-of an external package as well.

View File

@ -186,6 +186,7 @@ COLLECT-AROS := $(TOOLDIR)/collect-aros$(HOST_EXE_SUFFIX)
GENMODULE := $(TOOLDIR)/genmodule$(HOST_EXE_SUFFIX)
MKAMIKEYMAP := $(TOOLDIR)/mkamikeymap$(HOST_EXE_SUFFIX)
SETREV := $(TOOLDIR)/setrev$(HOST_EXE_SUFFIX)
PATCHELF := $(TOOLDIR)/patchelf$(HOST_EXE_SUFFIX)
@make_extra_commands@
RESIDENT_BEGIN := compiler/libinit/libentry
KICKSTART_BEGIN := compiler/libinit/kickentry

2
tools/patchelf/LEGAL Normal file
View File

@ -0,0 +1,2 @@
This software is GPLv3-licensed
https://github.com/NixOS/patchelf

16
tools/patchelf/Makefile Normal file
View File

@ -0,0 +1,16 @@
# Copyright © 2022, The AROS Development Team. All rights reserved.
# $Id$
include $(TOP)/config/make.cfg
NOWARN_FLAGS := -Wall
USER_CXXFLAGS := -std=c++17
all : $(PATCHELF)
$(PATCHELF) : patchelf.cc
@$(ECHO) "Compiling $(notdir $@)..."
@$(HOST_CXX) $(HOST_CXXFLAGS) $(USER_CXXFLAGS) $(NOWARN_FLAGS) $< -o $@
clean:
@$(RM) -f $(PATCHELF)

3311
tools/patchelf/elf.h Normal file

File diff suppressed because it is too large Load Diff

2129
tools/patchelf/patchelf.cc Normal file

File diff suppressed because it is too large Load Diff