Skip to content

Commit

Permalink
sync 2018.05
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxmon committed May 12, 2018
1 parent a2a52a3 commit 0e46861
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 21 deletions.
10 changes: 5 additions & 5 deletions LastSync.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
commit 30d34358a984603fd5bfea41630501303c840e2c
Author: Hans Dedecker <dedeckeh@gmail.com>
Date: Thu Feb 8 13:12:22 2018 +0100
commit dc629d9cf5afc03f67a294078ca1001e831c66c9
Author: John Crispin <john@phrozen.org>
Date: Thu May 10 10:22:19 2018 +0200

libubox: bump to git HEAD version
kernel: fix kmod-switch-rtl8366-smi dependency


Signed-off-by: John Crispin <john@phrozen.org>
2 changes: 2 additions & 0 deletions rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ BIN_DIR:=$(OUTPUT_DIR)/targets/$(BOARD)/$(SUBTARGET)
INCLUDE_DIR:=$(TOPDIR)/include
SCRIPT_DIR:=$(TOPDIR)/scripts
BUILD_DIR_BASE:=$(TOPDIR)/build_dir
# Entware specific
# Entware keeps LIBCV (LIBC version) as a suffix in directory names! Lede has removed it....
ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
GCCV:=$(call qstrip,$(CONFIG_GCC_VERSION))
Expand Down Expand Up @@ -146,6 +147,7 @@ endif
#endif

PACKAGE_DIR:=$(BIN_DIR)/packages
PACKAGE_DIR_ALL:=$(TOPDIR)/staging_dir/packages/$(BOARD)
BUILD_DIR:=$(BUILD_DIR_BASE)/$(TARGET_DIR_NAME)
STAGING_DIR:=$(TOPDIR)/staging_dir/$(TARGET_DIR_NAME)
BUILD_DIR_TOOLCHAIN:=$(BUILD_DIR_BASE)/$(TOOLCHAIN_DIR_NAME)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
---
ld/Makefile.am | 2 +-
ld/Makefile.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -57,7 +57,7 @@
@@ -57,7 +57,7 @@ endif
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
Expand All @@ -16,7 +11,7 @@
EMULATION_OFILES = @EMULATION_OFILES@
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -446,7 +446,7 @@
@@ -446,7 +446,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
# We put the scripts in the directory $(scriptdir)/ldscripts.
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
---
ld/emultempl/elf32.em | 4 ++++
1 file changed, 4 insertions(+)

--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1470,6 +1470,8 @@
@@ -1470,6 +1470,8 @@ fragment <<EOF
&& command_line.rpath == NULL)
{
path = (const char *) getenv ("LD_RUN_PATH");
Expand All @@ -13,11 +9,11 @@
if (path
&& gld${EMULATION_NAME}_search_needed (path, &n, force))
break;
@@ -1750,6 +1752,8 @@
@@ -1750,6 +1752,8 @@ gld${EMULATION_NAME}_before_allocation (
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
+ if ((rpath) && (*rpath == '\0'))
+ if ((rpath) && (strlen (rpath) == 0))
+ rpath = NULL;

for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -1189,12 +1189,12 @@ case "${targ}" in
@@ -1189,12 +1189,12 @@ case "${targ}" in
targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
;;
mips64*el-*-linux*)
Expand All @@ -19,7 +19,7 @@
targ_defvec=mips_elf32_trad_le_vec
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -535,11 +535,11 @@
@@ -535,11 +535,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmip
mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
targ_extra_emuls="elf32elmipvxworks" ;;
mips*-*-windiss) targ_emul=elf32mipswindiss ;;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
From dda6b050cd74a352670787a294596a9c56c21327 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Fri, 4 May 2018 18:20:53 +0800
Subject: [PATCH] gotools: fix compilation when making cross compiler

libgo is "the runtime support library for the Go programming language.
This library is intended for use with the Go frontend."

gccgo will link target files with libgo.so which depends on libgcc_s.so.1, but
the linker will complain that it cannot find it. That's because shared libgcc
is not present in the install directory yet. libgo.so was made without problem
because gcc will emit -lgcc_s when compiled with -shared option. When gotools
were being made, it was supplied with -static-libgcc thus no link option was
provided. Check LIBGO in gcc/go/gcc-spec.c for how gccgo make a builtin spec
for linking with libgo.so

- GccgoCrossCompilation, https://github.com/golang/go/wiki/GccgoCrossCompilation
- Cross-building instructions, http://www.eglibc.org/archives/patches/msg00078.html

When 3-pass GCC compilation is used, shared libgcc runtime libraries will be
available after gcc pass2 completed and will meet the gotools link requirement
at gcc pass3
---
gotools/Makefile.am | 4 +++-
gotools/Makefile.in | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/gotools/Makefile.am b/gotools/Makefile.am
index 5f3940a278b..9c22f5df103 100644
--- a/gotools/Makefile.am
+++ b/gotools/Makefile.am
@@ -26,6 +26,7 @@ PWD_COMMAND = $${PWDCMD-pwd}
STAMP = echo timestamp >

libgodir = ../$(target_noncanonical)/libgo
+libgccdir = ../$(target_noncanonical)/libgcc
LIBGODEP = $(libgodir)/libgo.la

if NATIVE
@@ -38,7 +39,8 @@ endif
GOCFLAGS = $(CFLAGS_FOR_TARGET)
GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS)

-AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs
+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \
+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s
GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@

cmdsrcdir = $(srcdir)/../libgo/go/cmd
diff --git a/gotools/Makefile.in b/gotools/Makefile.in
index 4386576b011..0bdd9290e01 100644
--- a/gotools/Makefile.in
+++ b/gotools/Makefile.in
@@ -252,13 +252,15 @@ mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
PWD_COMMAND = $${PWDCMD-pwd}
STAMP = echo timestamp >
libgodir = ../$(target_noncanonical)/libgo
+libgccdir = ../$(target_noncanonical)/libgcc
LIBGODEP = $(libgodir)/libgo.la
@NATIVE_FALSE@GOCOMPILER = $(GOC)

# Use the compiler we just built.
@NATIVE_TRUE@GOCOMPILER = $(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET)
GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS)
-AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs
+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \
+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s
GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@
cmdsrcdir = $(srcdir)/../libgo/go/cmd
go_cmd_go_files = \
--
2.16.3

0 comments on commit 0e46861

Please sign in to comment.