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

xserver-org_xserver & mariadb dependencies & -fPIC #1

Open
wants to merge 7 commits into
base: bryanforbes/macos
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .checkpackageignore
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ package/glorytun/0002-aegis256.c-fix-aarch64-build-with-uclibc.patch lib_patch.U
package/gnu-efi/0001-Make.defaults-don-t-override-ARCH-when-cross-compili.patch lib_patch.Upstream
package/gnupg/0001-build-Always-use-EXTERN_UNLESS_MAIN_MODULE-pattern.patch lib_patch.Upstream
package/gnuplot/0001-configure-add-without-demo-option.patch lib_patch.Upstream
package/go/0001-build.go-explicit-option-for-crosscompilation.patch lib_patch.Upstream
package/go/go-src/0001-build.go-explicit-option-for-crosscompilation.patch lib_patch.Upstream
package/gob2/0001-dont-include-from-prefix.patch lib_patch.Upstream
package/gobject-introspection/0001-disable-tests.patch lib_patch.Upstream
package/gobject-introspection/0002-Add-rpath-links-to-ccompiler.patch lib_patch.Upstream
Expand Down
6 changes: 3 additions & 3 deletions DEVELOPERS
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,6 @@ F: package/docker-engine/
F: package/embiggen-disk/
F: package/fuse-overlayfs/
F: package/go/
F: package/go-bootstrap-stage1/
F: package/go-bootstrap-stage2/
F: package/go-bootstrap-stage3/
F: package/gocryptfs/
F: package/mbpfan/
F: package/moby-buildkit/
Expand Down Expand Up @@ -3039,6 +3036,9 @@ F: package/frotz/
F: package/kvm-unit-tests/
F: package/xorcurses/

N: Thomas Perale <[email protected]>
F: package/go/

N: Thomas Petazzoni <[email protected]>
F: arch/Config.in.arm
F: board/beaglev/
Expand Down
49 changes: 49 additions & 0 deletions boot/syslinux/0021-mtools-build-for-the-host.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
From cbc07cc8e92d376572cee3c7ac01926925ec7337 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <[email protected]>
Date: Thu, 16 Apr 2020 16:56:52 +0200
Subject: [PATCH] mtools: build for the host

Signed-off-by: Thomas Petazzoni <[email protected]>
---
mtools/Makefile | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/mtools/Makefile b/mtools/Makefile
index 70269efd..aa78311d 100755
--- a/mtools/Makefile
+++ b/mtools/Makefile
@@ -2,8 +2,8 @@ include $(MAKEDIR)/syslinux.mk

OPTFLAGS = -g -Os
INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../libfat -I$(SRC)/../libinstaller
-CFLAGS = $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
-LDFLAGS =
+CFLAGS = $(CFLAGS_FOR_BUILD) $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
+LDFLAGS = $(LDFLAGS_FOR_BUILD)

SRCS = syslinux.c \
../libinstaller/fs.c \
@@ -34,16 +34,16 @@ spotless: clean
installer: syslinux

syslinux: $(OBJS)
- $(CC) $(LDFLAGS) -o $@ $^
+ $(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^

strip:
$(STRIP) syslinux

%.o: %.c
- $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
+ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
%.i: %.c
- $(CC) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
+ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
%.s: %.c
- $(CC) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<
+ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<

-include .*.d
--
2.25.2

11 changes: 6 additions & 5 deletions boot/syslinux/syslinux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,12 @@ endef
# That 'syslinux' binary is an installer actually built for the target.
# However, buildroot makes no usage of it, so better delete it than have it
# installed at the wrong place
define SYSLINUX_POST_INSTALL_CLEANUP
# batocera need syslinux util
# rm -rf $(HOST_DIR)/bin/syslinux
endef
SYSLINUX_POST_INSTALL_TARGET_HOOKS += SYSLINUX_POST_INSTALL_CLEANUP
#
# batocera: patch added to build syslinux tool for the host
# define SYSLINUX_POST_INSTALL_CLEANUP
# rm -rf $(HOST_DIR)/bin/syslinux
# endef
# SYSLINUX_POST_INSTALL_TARGET_HOOKS += SYSLINUX_POST_INSTALL_CLEANUP

SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_ISOLINUX) += bios/core/isolinux.bin
SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_PXELINUX) += bios/core/pxelinux.bin
Expand Down
3 changes: 0 additions & 3 deletions package/Config.in.host
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ menu "Host utilities"
source "package/genpart/Config.in.host"
source "package/gnupg/Config.in.host"
source "package/go/Config.in.host"
source "package/go-bootstrap-stage1/Config.in.host"
source "package/go-bootstrap-stage2/Config.in.host"
source "package/go-bootstrap-stage3/Config.in.host"
source "package/google-breakpad/Config.in.host"
source "package/gptfdisk/Config.in.host"
source "package/imagemagick/Config.in.host"
Expand Down
1 change: 1 addition & 0 deletions package/balena-engine/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ config BR2_PACKAGE_BALENA_ENGINE
depends on !BR2_TOOLCHAIN_USES_UCLIBC # no fexecve
depends on BR2_USE_MMU # util-linux
select BR2_PACKAGE_CGROUPFS_MOUNT if !BR2_PACKAGE_SYSTEMD # runtime
select BR2_PACKAGE_HOST_GO
select BR2_PACKAGE_IPTABLES # runtime
select BR2_PACKAGE_UTIL_LINUX # runtime
select BR2_PACKAGE_UTIL_LINUX_BINARIES # runtime
Expand Down
1 change: 1 addition & 0 deletions package/cni-plugins/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ config BR2_PACKAGE_CNI_PLUGINS
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on !BR2_TOOLCHAIN_USES_UCLIBC # no fexecve
depends on BR2_USE_MMU
select BR2_PACKAGE_HOST_GO
help
Container Networking Interface plugins.

Expand Down
1 change: 1 addition & 0 deletions package/containerd/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ config BR2_PACKAGE_CONTAINERD
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on !BR2_TOOLCHAIN_USES_UCLIBC # runc
depends on BR2_USE_MMU # util-linux
select BR2_PACKAGE_HOST_GO
select BR2_PACKAGE_RUNC if !BR2_PACKAGE_CRUN # runtime dependency
select BR2_PACKAGE_UTIL_LINUX # runtime dependency
select BR2_PACKAGE_UTIL_LINUX_BINARIES
Expand Down
1 change: 1 addition & 0 deletions package/crucible/Config.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
config BR2_PACKAGE_CRUCIBLE
bool "crucible"
depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
select BR2_PACKAGE_HOST_GO
help
Crucible is a One-Time-Programmable (OTP) fusing tool for the
i.MX family.
Expand Down
1 change: 1 addition & 0 deletions package/delve/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ config BR2_PACKAGE_DELVE_ARCH_SUPPORTS
default y if BR2_x86_64
depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
select BR2_PACKAGE_HOST_GO

config BR2_PACKAGE_DELVE
bool "delve"
Expand Down
1 change: 1 addition & 0 deletions package/delve/Config.in.host
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
config BR2_PACKAGE_HOST_DELVE
bool "host delve"
depends on BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
select BR2_PACKAGE_HOST_GO
help
Delve is a debugger for the Go programming language.

Expand Down
1 change: 1 addition & 0 deletions package/docker-cli/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ config BR2_PACKAGE_DOCKER_CLI
depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
depends on BR2_TOOLCHAIN_HAS_THREADS
select BR2_PACKAGE_HOST_GO
help
Docker is a platform to build, ship,
and run applications as lightweight containers.
Expand Down
1 change: 1 addition & 0 deletions package/docker-compose/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ config BR2_PACKAGE_DOCKER_COMPOSE
depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_PACKAGE_DOCKER_CLI
select BR2_PACKAGE_HOST_GO
help
Multi-container applications with the Docker CLI.

Expand Down
1 change: 1 addition & 0 deletions package/docker-engine/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ config BR2_PACKAGE_DOCKER_ENGINE
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # libseccomp
select BR2_PACKAGE_CGROUPFS_MOUNT if !BR2_PACKAGE_SYSTEMD # runtime dependency
select BR2_PACKAGE_CONTAINERD # runtime dependency
select BR2_PACKAGE_HOST_GO
select BR2_PACKAGE_IPTABLES # runtime dependency
select BR2_PACKAGE_LIBSECCOMP
help
Expand Down
1 change: 1 addition & 0 deletions package/embiggen-disk/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ config BR2_PACKAGE_EMBIGGEN_DISK
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on !BR2_TOOLCHAIN_USES_UCLIBC # no fexecve
depends on BR2_USE_MMU # util-linux
select BR2_PACKAGE_HOST_GO
select BR2_PACKAGE_UTIL_LINUX # sfdisk
select BR2_PACKAGE_UTIL_LINUX_BINARIES # sfdisk
help
Expand Down
1 change: 1 addition & 0 deletions package/flannel/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ config BR2_PACKAGE_FLANNEL
depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
depends on BR2_TOOLCHAIN_HAS_THREADS
select BR2_PACKAGE_HOST_GO
help
Flannel is a virtual network that gives a subnet to each
host for use with container runtimes.
Expand Down
1 change: 1 addition & 0 deletions package/gitlab-runner/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ config BR2_PACKAGE_GITLAB_RUNNER
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash
select BR2_PACKAGE_CA_CERTIFICATES # runtime
select BR2_PACKAGE_GIT # runtime
select BR2_PACKAGE_HOST_GO
select BR2_PACKAGE_LIBCURL # runtime
select BR2_PACKAGE_LIBCURL_CURL # runtime
select BR2_PACKAGE_LIBCURL_FORCE_TLS # runtime
Expand Down
48 changes: 47 additions & 1 deletion package/go/Config.in.host
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
config BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
bool
default y
depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS
# See https://go.dev/doc/install/source#environment
# See src/go/build/syslist.go for the list of supported architectures
depends on (BR2_arm && BR2_TOOLCHAIN_SUPPORTS_PIE) || BR2_aarch64 \
Expand All @@ -25,9 +24,56 @@ config BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
# Go doesn't support CGO linking on MIPS64x platforms
# See: https://github.com/karalabe/xgo/issues/46
depends on !BR2_mips64 && !BR2_mips64el
# go uses dlfcn.h + cgo for its plugin module
depends on !BR2_STATIC_LIBS
# cgo supports uses threads
depends on BR2_TOOLCHAIN_HAS_THREADS

# Host go packages should depend on BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
config BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS
bool
default y
depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS || BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH_SUPPORTS

# Go packages should select BR2_PACKAGE_HOST_GO
config BR2_PACKAGE_HOST_GO
bool
depends on BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS

if BR2_PACKAGE_HOST_GO

choice
prompt "Go compiler variant"
default BR2_PACKAGE_HOST_GO_SRC if BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS
default BR2_PACKAGE_HOST_GO_BIN if BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH_SUPPORTS
help
Select a Go compiler variant.

Default to 'host-go-src'.

config BR2_PACKAGE_HOST_GO_SRC
bool "host go (source)"
depends on BR2_PACKAGE_HOST_GO_BOOTSTRAP_STAGE3_ARCH_SUPPORTS
help
This package will build the go compiler for the host.

config BR2_PACKAGE_HOST_GO_BIN
bool "host go (pre-built)"
depends on BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH_SUPPORTS
help
This package will install pre-built versions of the compiler

endchoice

config BR2_PACKAGE_PROVIDES_HOST_GO
string
# Default to host-go-src
default "host-go-src" if BR2_PACKAGE_HOST_GO_SRC
default "host-go-bin" if BR2_PACKAGE_HOST_GO_BIN

endif

source "package/go/go-bin/Config.in.host"
source "package/go/go-bootstrap-stage1/Config.in.host"
source "package/go/go-bootstrap-stage2/Config.in.host"
source "package/go/go-bootstrap-stage3/Config.in.host"
13 changes: 13 additions & 0 deletions package/go/go-bin/Config.in.host
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
config BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH
string "Translate the HOSTARCH into the architecture name used by the Go compiler"
default "armv6l" if BR2_HOSTARCH = "arm"
default "arm64" if BR2_HOSTARCH = "aarch64"
default "ppc64le" if BR2_HOSTARCH = "powerpc64le"
default "s390x" if BR2_HOSTARCH = "s390x"
default "386" if BR2_HOSTARCH = "x86"
default "amd64" if BR2_HOSTARCH = "x86_64"

config BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH_SUPPORTS
bool
default y
depends on BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH != ""
9 changes: 9 additions & 0 deletions package/go/go-bin/go-bin.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# sha256 checksum from https://go.dev/dl/
sha256 ac9c723f224969aee624bc34fd34c9e13f2a212d75c71c807de644bb46e112f6 go1.22.5.src.tar.gz
sha256 3ea4c78e6fa52978ae1ed2e5927ad17495da440c9fae7787b1ebc1d0572f7f43 go1.22.5.linux-386.tar.gz
sha256 904b924d435eaea086515bc63235b192ea441bd8c9b198c507e85009e6e4c7f0 go1.22.5.linux-amd64.tar.gz
sha256 8d21325bfcf431be3660527c1a39d3d9ad71535fabdf5041c826e44e31642b5a go1.22.5.linux-arm64.tar.gz
sha256 8c4587cf3e63c9aefbcafa92818c4d9d51683af93ea687bf6c7508d6fa36f85e go1.22.5.linux-armv6l.tar.gz
sha256 5312bb420ac0b59175a58927e70b4660b14ab7319aab54398b6071fabcbfbb09 go1.22.5.linux-ppc64le.tar.gz
sha256 24c6c5c9d515adea5d58ae78388348c97614a0c21ac4d4f4c0dab75e893b0b5d go1.22.5.linux-s390x.tar.gz
sha256 2d36597f7117c38b006835ae7f537487207d8ec407aa9d9980794b2030cbc067 LICENSE
20 changes: 20 additions & 0 deletions package/go/go-bin/go-bin.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
################################################################################
#
# go-bin
#
################################################################################

GO_BIN_SITE = https://go.dev/dl
HOST_GO_BIN_ACTUAL_SOURCE_TARBALL = go$(GO_VERSION).src.tar.gz
GO_BIN_LICENSE = BSD-3-Clause
GO_BIN_LICENSE_FILES = LICENSE

HOST_GO_BIN_PROVIDES = host-go

HOST_GO_BIN_SOURCE = go$(GO_VERSION).linux-$(call qstrip, $(BR2_PACKAGE_HOST_GO_BIN_HOST_ARCH)).tar.gz

define HOST_GO_BIN_INSTALL_CMDS
$(GO_BINARIES_INSTALL)
endef

$(eval $(host-generic-package))
File renamed without changes.
56 changes: 56 additions & 0 deletions package/go/go-src/go-src.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
################################################################################
#
# go-src
#
################################################################################

GO_SRC_SITE = https://storage.googleapis.com/golang
GO_SRC_SOURCE = go$(GO_VERSION).src.tar.gz

GO_SRC_LICENSE = BSD-3-Clause
GO_SRC_LICENSE_FILES = LICENSE
GO_SRC_CPE_ID_VENDOR = golang

HOST_GO_SRC_PROVIDES = host-go
HOST_GO_SRC_DEPENDENCIES = \
host-go-bootstrap-stage3 \
$(HOST_GO_DEPENDENCIES_CGO)

ifeq ($(BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS),y)

HOST_GO_SRC_CROSS_ENV = \
CC_FOR_TARGET="$(TARGET_CC)" \
CXX_FOR_TARGET="$(TARGET_CXX)" \
GOOS="linux" \
GOARCH=$(GO_GOARCH) \
$(if $(GO_GO386),GO386=$(GO_GO386)) \
$(if $(GO_GOARM),GOARM=$(GO_GOARM)) \
GO_ASSUME_CROSSCOMPILING=1

endif

# The go build system is not compatible with ccache, so use
# HOSTCC_NOCCACHE. See https://github.com/golang/go/issues/11685.
HOST_GO_SRC_MAKE_ENV = \
GO111MODULE=off \
GOCACHE=$(HOST_GO_HOST_CACHE) \
GOROOT_BOOTSTRAP=$(HOST_GO_BOOTSTRAP_STAGE3_ROOT) \
GOROOT_FINAL=$(HOST_GO_ROOT) \
GOROOT="$(@D)" \
GOBIN="$(@D)/bin" \
GOOS=linux \
CC=$(HOSTCC_NOCCACHE) \
CXX=$(HOSTCXX_NOCCACHE) \
CGO_ENABLED=$(HOST_GO_CGO_ENABLED) \
$(HOST_GO_SRC_CROSS_ENV)

define HOST_GO_SRC_BUILD_CMDS
cd $(@D)/src && \
$(HOST_GO_SRC_MAKE_ENV) ./make.bash $(if $(VERBOSE),-v)
endef

define HOST_GO_SRC_INSTALL_CMDS
$(GO_BINARIES_INSTALL)
endef

$(eval $(host-generic-package))
Loading