Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
From 7f54d48ee5db037778ead310e0b8278f3fe70b41 Mon Sep 17 00:00:00 2001
|
||||
From: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
||||
Date: Sun, 19 Dec 2021 07:52:55 +0100
|
||||
Subject: [PATCH] src/rebar_port_compiler: add -fPIC to LDFLAGS by default
|
||||
|
||||
Since both DRV_CFLAGS and EXE_CFLAGS list -fPIC we need also the LDFLAGS
|
||||
to follow them. Unfortunately adding -fPIC only to DRV_LDFLAGS and
|
||||
EXE_LDFLAGS is not sufficient, since when linking as a library(.so) it
|
||||
doesn't take into account those variables. Since -fPIC is needed by default
|
||||
by any kind of linking, let's add it to the general -fPIC. Rebar seems to
|
||||
link libraries without taking into account any variable listed in:
|
||||
src/rebar_port_compiler.erl
|
||||
this after testing and tracing for every variable.
|
||||
|
||||
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
|
||||
---
|
||||
src/rebar_port_compiler.erl | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/rebar_port_compiler.erl b/src/rebar_port_compiler.erl
|
||||
index 9679c80..bd08b21 100644
|
||||
--- a/src/rebar_port_compiler.erl
|
||||
+++ b/src/rebar_port_compiler.erl
|
||||
@@ -645,6 +645,8 @@ default_env() ->
|
||||
{"OBJCOPY", get_tool(Arch, "objcopy", "objcopy")},
|
||||
{"OBJDUMP", get_tool(Arch, "objdump", "objdump")},
|
||||
|
||||
+ {"LDFLAGS", "-fPIC $LDFLAGS"},
|
||||
+
|
||||
{"DRV_CXX_TEMPLATE",
|
||||
"$CXX -c $CXXFLAGS $DRV_CFLAGS $PORT_IN_FILES -o $PORT_OUT_FILE"},
|
||||
{"DRV_CC_TEMPLATE",
|
||||
--
|
||||
2.25.1
|
||||
|
||||
3
package/erlang-rebar/erlang-rebar.hash
Normal file
3
package/erlang-rebar/erlang-rebar.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 577246bafa2eb2b2c3f1d0c157408650446884555bf87901508ce71d5cc0bd07 erlang-rebar-2.6.4.tar.gz
|
||||
sha256 809fa1ed21450f59827d1e9aec720bbc4b687434fa22283c6cb5dd82a47ab9c0 LICENSE
|
||||
31
package/erlang-rebar/erlang-rebar.mk
Normal file
31
package/erlang-rebar/erlang-rebar.mk
Normal file
@@ -0,0 +1,31 @@
|
||||
################################################################################
|
||||
#
|
||||
# erlang-rebar
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ERLANG_REBAR_VERSION = 2.6.4
|
||||
|
||||
# Upstream publishes a release, but we can not use it as it is a release of
|
||||
# a generated rebar script, when we want the sources. So we have to use the
|
||||
# gihub helper in this case.
|
||||
ERLANG_REBAR_SITE = $(call github,rebar,rebar,$(ERLANG_REBAR_VERSION))
|
||||
|
||||
# Although the file LICENSE state Apache-2.0, a lot (if not all) the files
|
||||
# in src/ bear the MIT licence.
|
||||
ERLANG_REBAR_LICENSE = Apache-2.0, MIT
|
||||
ERLANG_REBAR_LICENSE_FILES = LICENSE
|
||||
|
||||
# We do not have a target variant, so just define the dependencies,
|
||||
# configure and build commands for the host variant.
|
||||
HOST_ERLANG_REBAR_DEPENDENCIES = host-erlang
|
||||
|
||||
define HOST_ERLANG_REBAR_BUILD_CMDS
|
||||
cd $(@D) && $(HOST_MAKE_ENV) $(MAKE)
|
||||
endef
|
||||
|
||||
define HOST_ERLANG_REBAR_INSTALL_CMDS
|
||||
$(INSTALL) -m 0755 -D $(@D)/rebar $(HOST_DIR)/bin/rebar
|
||||
endef
|
||||
|
||||
$(eval $(host-generic-package))
|
||||
Reference in New Issue
Block a user