Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update synocli-devel #5882

Merged
merged 5 commits into from
Sep 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions cross/binutils-2.32/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
PKG_NAME = binutils
PKG_VERS = 2.32
PKG_EXT = tar.xz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://ftp.gnu.org/gnu/binutils
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS = cross/zlib cross/mpfr

HOMEPAGE = https://www.gnu.org/software/binutils/
COMMENT = GNU Binutils
LICENSE = GPLv2/LGPLv2

GNU_CONFIGURE = 1

CONFIGURE_ARGS += --enable-host-shared
CONFIGURE_ARGS += --with-system-zlib
CONFIGURE_ARGS += --enable-gold=yes

include ../../mk/spksrc.archs.mk

# embedspu is a tool to "Embed an SPU ELF executable into a PowerPC object file"
# and hence built only for PPC_ARCHS.
ifneq ($(findstring $(ARCH),$(PPC_ARCHS)),$(ARCH))
PLIST_TRANSFORM = sed -e '/bin\/embedspu/d'
endif

include ../../mk/spksrc.cross-cc.mk
19 changes: 19 additions & 0 deletions cross/binutils-2.32/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
bin:bin/addr2line
bin:bin/ar
bin:bin/as
bin:bin/c++filt
bin:bin/dwp
bin:bin/elfedit
bin:bin/embedspu
bin:bin/gprof
bin:bin/ld
bin:bin/ld.bfd
bin:bin/ld.gold
bin:bin/nm
bin:bin/objcopy
bin:bin/objdump
bin:bin/ranlib
bin:bin/readelf
bin:bin/size
bin:bin/strings
bin:bin/strip
3 changes: 3 additions & 0 deletions cross/binutils-2.32/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
binutils-2.32.tar.xz SHA1 cd45a512af1c8a508976c1beb4f5825b3bb89f4d
binutils-2.32.tar.xz SHA256 0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04
binutils-2.32.tar.xz MD5 0d174cdaf85721c5723bf52355be41e6
38 changes: 38 additions & 0 deletions cross/binutils-latest/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
PKG_NAME = binutils
PKG_VERS = 2.40
PKG_EXT = tar.xz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://ftp.gnu.org/gnu/binutils
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS = cross/zlib cross/mpfr

HOMEPAGE = https://www.gnu.org/software/binutils/
COMMENT = GNU Binutils
LICENSE = GPLv2/LGPLv2

GNU_CONFIGURE = 1

CONFIGURE_ARGS += --enable-host-shared
CONFIGURE_ARGS += --with-system-zlib
CONFIGURE_ARGS += --enable-gold=yes

include ../../mk/spksrc.archs.mk

# embedspu is a tool to "Embed an SPU ELF executable into a PowerPC object file"
# and hence built only for PPC_ARCHS.
# gprofng fails to build on i686 and does not build on other 32-bit archs.
ifeq ($(findstring $(ARCH),$(64bit_ARCHS)),$(ARCH))
PLIST_TRANSFORM = sed -e '/bin\/embedspu/d'
else
CONFIGURE_ARGS += --disable-gprofng
PLIST_TRANSFORM = sed -e '/bin\/gprofng/d' -e '/bin\/gp\-/d' -e '/lib\/gprofng/d'
ifneq ($(findstring $(ARCH),$(PPC_ARCHS)),$(ARCH))
PLIST_TRANSFORM += -e '/bin\/embedspu/d'
endif
endif

# Avoid conflicts with gdb
CONFIGURE_ARGS += --includedir=$(INSTALL_PREFIX)/include/binutils

include ../../mk/spksrc.cross-cc.mk
1 change: 1 addition & 0 deletions cross/binutils/PLIST → cross/binutils-latest/PLIST
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ bin:bin/as
bin:bin/c++filt
bin:bin/dwp
bin:bin/elfedit
bin:bin/embedspu
bin:bin/gp-archive
bin:bin/gp-collect-app
rsc:bin/gp-display-html
Expand Down
File renamed without changes.
35 changes: 8 additions & 27 deletions cross/binutils/Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,12 @@
PKG_NAME = binutils
PKG_VERS = 2.40
PKG_EXT = tar.xz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://ftp.gnu.org/gnu/binutils
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)
PKG_NAME = binutils-main

DEPENDS = cross/zlib cross/gmp cross/mpfr
OPTIONAL_DEPENDS = cross/binutils-latest
OPTIONAL_DEPENDS += cross/binutils-2.32

HOMEPAGE = https://www.gnu.org/software/binutils/
COMMENT = GNU Binutils
LICENSE = GPLv2/LGPLv2
include ../../mk/spksrc.main-depends.mk

GNU_CONFIGURE = 1

include ../../mk/spksrc.archs.mk

CONFIGURE_ARGS += --enable-host-shared
CONFIGURE_ARGS += --with-system-zlib
CONFIGURE_ARGS += --enable-gold=yes

# Fails to build on i686 and does not build on other 32-bit archs
ifneq ($(findstring $(ARCH),$(64bit_ARCHS)),$(ARCH))
CONFIGURE_ARGS += --disable-gprofng
PLIST_TRANSFORM = sed -e '/bin\/gprofng/d' -e '/bin\/gp\-/d' -e '/lib\/gprofng/d'
ifeq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH))
DEPENDS = cross/binutils-2.32
else
DEPENDS = cross/binutils-latest
endif

# Avoid conflicts with gdb
CONFIGURE_ARGS += --includedir=$(INSTALL_PREFIX)/include/binutils

include ../../mk/spksrc.cross-cc.mk
41 changes: 22 additions & 19 deletions cross/gdb-7.12/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,49 @@ PKG_DIR = $(PKG_NAME)-$(PKG_VERS)
DEPENDS = cross/zlib cross/libexpat cross/gmp cross/ncursesw cross/mpfr

HOMEPAGE = https://www.gnu.org/software/gdb/
COMMENT = The GNU Project Debugger
COMMENT = The GNU Project Debugger.
LICENSE = GPLv2/LGPLv2

UNSUPPORTED_ARCHS = $(PPC_ARCHS)

GNU_CONFIGURE = 1

CONFIGURE_TARGET = gdb_configure
COMPILE_TARGET = gdb_compile
INSTALL_TARGET = gdb_install

CONFIGURE_ARGS = --enable-host-shared
CONFIGURE_ARGS += --with-system-zlib

include ../../mk/spksrc.common.mk

CONFIGURE_ARGS += $(TC_CONFIGURE_ARGS)
CONFIGURE_ARGS += --prefix=$(INSTALL_PREFIX)
CONFIGURE_ARGS += --enable-host-shared
CONFIGURE_ARGS += --with-system-zlib
ifeq ($(call version_ge, ${TCVERSION}, 7.0),1)
CONFIGURE_ARGS += --localstatedir=$(INSTALL_PREFIX_VAR)
PLIST_TRANSFORM_SED_ARGS =

# Library is not created for 32-bit non intel archs
ifeq ($(findstring $(ARCH),$(32bit_ARCHS)),$(ARCH))
ifneq ($(findstring $(ARCH),$(i686_ARCHS)),$(ARCH))
PLIST_TRANSFORM_SED_ARGS += -e 's?lib:lib/libinproctrace.so??g'
endif
endif

include ../../mk/spksrc.cross-cc.mk
ifneq ($(findstring $(ARCH),$(ARM_ARCHS)),$(ARCH))
# binary only created for arm
PLIST_TRANSFORM_SED_ARGS += -e 's?bin:bin/run??g'
endif

# Library is not created under armv5 and armv7
ifeq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(ARMv7_ARCHS) $(ARMv7L_ARCHS)),$(ARCH))
PLIST_TRANSFORM = sed -e 's?lib:lib/libinproctrace.so??g'
# binary only created on armv7
else
PLIST_TRANSFORM = sed -e 's?bin:bin/run??g'
ifneq ($(strip $(PLIST_TRANSFORM_SED_ARGS)),)
PLIST_TRANSFORM = sed $(PLIST_TRANSFORM_SED_ARGS)
endif

include ../../mk/spksrc.cross-cc.mk

.PHONY: gdb_configure
gdb_configure:
@$(RUN) mkdir -p build
@$(RUN) ; cd build ; PATH=$(TC_PATH):$$PATH CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" $(WORK_DIR)/$(PKG_DIR)/configure $(CONFIGURE_ARGS)
@$(RUN) ; cd build ; PATH=$(abspath $(TC_PATH)):$$PATH CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" $(WORK_DIR)/$(PKG_DIR)/configure $(REAL_CONFIGURE_ARGS)

.PHONY: gdb_compile
gdb_compile:
@$(RUN) ; cd build ; PATH=$(TC_PATH):$$PATH make
@$(RUN) ; cd build ; PATH=$(abspath $(TC_PATH)):$$PATH $(MAKE)

.PHONY: gdb_install
gdb_install:
@$(RUN) ; cd build ; PATH=$(TC_PATH):$$PATH make install DESTDIR=$(INSTALL_DIR)
@$(RUN) ; cd build ; PATH=$(abspath $(TC_PATH)):$$PATH $(MAKE) install DESTDIR=$(INSTALL_DIR)
74 changes: 74 additions & 0 deletions cross/gdb-7.12/patches/001-fix-sim-ppc-duplicate-symbols.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# fix duplicate symbols in sim/ppc sources
# - declare 'extern' to avoid allocation of the symbols for each file that includes sim/ppc/ld-insn.h
# - allocate those variables in sim/ppc/ld-insn.c only
#
--- sim/ppc/ld-insn.h.orig 2014-06-11 16:34:42.000000000 +0000
+++ sim/ppc/ld-insn.h 2023-09-12 13:47:17.677392900 +0000
@@ -200,25 +200,25 @@
table_include *includes,
cache_table **cache_rules);

-model *models;
-model *last_model;
+extern model *models;
+extern model *last_model;

-insn *model_macros;
-insn *last_model_macro;
+extern insn *model_macros;
+extern insn *last_model_macro;

-insn *model_functions;
-insn *last_model_function;
+extern insn *model_functions;
+extern insn *last_model_function;

-insn *model_internal;
-insn *last_model_internal;
+extern insn *model_internal;
+extern insn *last_model_internal;

-insn *model_static;
-insn *last_model_static;
+extern insn *model_static;
+extern insn *last_model_static;

-insn *model_data;
-insn *last_model_data;
+extern insn *model_data;
+extern insn *last_model_data;

-int max_model_fields_len;
+extern int max_model_fields_len;

extern void insn_table_insert_insn
(insn_table *table,
--- sim/ppc/ld-insn.c.orig 2014-06-11 16:34:42.000000000 +0000
+++ sim/ppc/ld-insn.c 2023-09-12 14:04:28.924210287 +0000
@@ -28,6 +28,26 @@

#include "igen.h"

+model *models;
+model *last_model;
+
+insn *model_macros;
+insn *last_model_macro;
+
+insn *model_functions;
+insn *last_model_function;
+
+insn *model_internal;
+insn *last_model_internal;
+
+insn *model_static;
+insn *last_model_static;
+
+insn *model_data;
+insn *last_model_data;
+
+int max_model_fields_len;
+
static void
update_depth(insn_table *entry,
lf *file,
14 changes: 14 additions & 0 deletions cross/gdb-7.12/patches/002-fix-configure-of-sim-ppc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# fix configure for sim/ppc
# - avoid the use of target CPPFLAGS for build
#
--- sim/ppc/configure.orig 2016-08-01 15:50:21.000000000 +0000
+++ sim/ppc/configure 2023-09-13 10:14:14.609339863 +0000
@@ -7707,7 +7707,7 @@
*) realsrcdir=../${srcdir};;
esac
saved_CFLAGS="${CFLAGS}"
- CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" CPPFLAGS="" \
LDFLAGS="${LDFLAGS_FOR_BUILD}" \
${realsrcdir}/configure \
--enable-languages=${enable_languages-all} \
39 changes: 29 additions & 10 deletions cross/gdb-latest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,40 @@ PKG_DIR = $(PKG_NAME)-$(PKG_VERS)
DEPENDS = cross/zlib cross/libexpat cross/gmp cross/ncursesw cross/mpfr

HOMEPAGE = https://www.gnu.org/software/gdb/
COMMENT = The GNU Project Debugger
COMMENT = The GNU Project Debugger.
LICENSE = GPLv2/LGPLv2

GNU_CONFIGURE = 1
CONFIGURE_ARGS += --enable-host-shared
CONFIGURE_ARGS = --enable-host-shared
CONFIGURE_ARGS += --with-system-zlib

UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(PPC_ARCHS)
include ../../mk/spksrc.common.mk

include ../../mk/spksrc.cross-cc.mk
ifeq ($(call version_lt, $(TC_GCC), 4.8.1),1)
UNSUPPORTED_ARCHS = $(ARCHS)
endif

ifeq ($(findstring $(ARCH),$(PPC_ARCHS)),$(ARCH))
# sim/ppc is broken
CONFIGURE_ARGS += --disable-sim
endif

PLIST_TRANSFORM_SED_ARGS =

# Library is not created for 32-bit non intel archs
ifeq ($(findstring $(ARCH),$(32bit_ARCHS)),$(ARCH))
ifneq ($(findstring $(ARCH),$(i686_ARCHS)),$(ARCH))
PLIST_TRANSFORM_SED_ARGS += -e 's?lib:lib/libinproctrace.so??g'
endif
endif

ifneq ($(findstring $(ARCH),$(ARM_ARCHS)),$(ARCH))
# binary only created for arm
PLIST_TRANSFORM_SED_ARGS += -e 's?bin:bin/run??g'
endif

# Library is not created under armv7
ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS) $(ARMv7L_ARCHS)),$(ARCH))
PLIST_TRANSFORM = sed -e 's?lib:lib/libinproctrace.so??g'
# binary only created on armv7
else
PLIST_TRANSFORM = sed -e 's?bin:bin/run??g'
ifneq ($(strip $(PLIST_TRANSFORM_SED_ARGS)),)
PLIST_TRANSFORM = sed $(PLIST_TRANSFORM_SED_ARGS)
endif

include ../../mk/spksrc.cross-cc.mk
3 changes: 2 additions & 1 deletion cross/gdb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ OPTIONAL_DEPENDS += cross/gdb-7.12

include ../../mk/spksrc.main-depends.mk

ifeq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH))
ifeq ($(call version_lt, $(TC_GCC), 4.8.1),1)
DEPENDS += cross/gdb-7.12
else
# A compiler with support for C++11 language features is required.
DEPENDS += cross/gdb-latest
endif
11 changes: 8 additions & 3 deletions cross/llvm-9.0/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ PKG_DIST_SITE = https://github.com/llvm/llvm-project/releases/download/llvmorg-$
PKG_DIR = $(PKG_NAME)-project-$(PKG_VERS)

HOMEPAGE = https://llvm.org/
COMMENT = The LLVM Project is a collection of modular and reusable compiler and toolchain technologies
LICENSE = Apache License v2.0 with LLVM Exceptions
COMMENT = The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
LICENSE = Apache v2.0 with LLVM Exceptions

UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(PPC_ARCHS)
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(OLD_PPC_ARCHS)
CMAKE_USE_NINJA = 1

# Using LLVM project source need to change to llvm sub-directory
Expand Down Expand Up @@ -124,6 +124,11 @@ CMAKE_ARGS += -DLLVM_TARGETS_TO_BUILD=X86
CMAKE_ARGS += -DLLVM_ENABLE_PROJECTS='clang;compiler-rt;lld'
endif

ifeq ($(findstring $(ARCH),$(PPC_ARCHS)),$(ARCH))
CMAKE_ARGS += -DLLVM_TARGETS_TO_BUILD=PowerPC
CMAKE_ARGS += -DLLVM_ENABLE_PROJECTS='clang;compiler-rt;lld'
endif

include ../../mk/spksrc.cross-cmake.mk

ifeq ($(call version_lt, $(TC_GCC), 5.1),1)
Expand Down
2 changes: 1 addition & 1 deletion cross/llvm-latest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PKG_DIR = $(PKG_NAME)-project-$(PKG_VERS).src

HOMEPAGE = https://llvm.org/
COMMENT = The LLVM Project is a collection of modular and reusable compiler and toolchain technologies
LICENSE = Apache License v2.0 with LLVM Exceptions
LICENSE = Apache v2.0 with LLVM Exceptions

REQUIRED_MIN_DSM = 7.0
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(PPC_ARCHS) comcerto2k
Expand Down
Loading