Re: [OpenWrt-Devel] [PATCH] toolchain/gcc: switch to version 8 by default

2019-10-01 Thread Andre Heider

On 01/10/2019 09:45, Andre Heider wrote:

Hi,

On 28/09/2019 22:44, Paul Spooren wrote:

Main motivation for this commit is the introduction of
`-ffile-prefix-map=` which alows reproducible build path.


compilation failed for me, it tried to use -iremap. Maybe you used 
CONFIG_GCC_USE_EMBEDDED_PATH_REMAP?


Attached a fixup that works for me, runtime tested on sunxi.

Regards,
Andre


and with that fixup 
package/libs/openssl/patches/120-strip-cflags-from-binary.patch prolly 
wants to filter out -ffile-prefix-map too.


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] toolchain/gcc: switch to version 8 by default

2019-10-01 Thread Andre Heider

Hi,

On 28/09/2019 22:44, Paul Spooren wrote:

Main motivation for this commit is the introduction of
`-ffile-prefix-map=` which alows reproducible build path.


compilation failed for me, it tried to use -iremap. Maybe you used 
CONFIG_GCC_USE_EMBEDDED_PATH_REMAP?


Attached a fixup that works for me, runtime tested on sunxi.

Regards,
Andre
commit 818244878603e8cb45d06473f2a5a72c5f9254a7
Author: Andre Heider 
Date:   Tue Oct 1 09:37:52 2019 +0200

fixup gcc8

diff --git a/config/Config-build.in b/config/Config-build.in
index 9669fc86c7..872e5c12ab 100644
--- a/config/Config-build.in
+++ b/config/Config-build.in
@@ -243,7 +243,6 @@ menu "Global build settings"
 		config PKG_CC_STACKPROTECTOR_STRONG
 			bool "Strong"
 			select GCC_LIBSSP if !USE_MUSL
-			depends on !GCC_VERSION_4_8
 			depends on KERNEL_CC_STACKPROTECTOR_STRONG
 	endchoice
 
@@ -258,7 +257,6 @@ menu "Global build settings"
 		config KERNEL_CC_STACKPROTECTOR_REGULAR
 			bool "Regular"
 		config KERNEL_CC_STACKPROTECTOR_STRONG
-			depends on !GCC_VERSION_4_8
 			bool "Strong"
 	endchoice
 
diff --git a/rules.mk b/rules.mk
index b140fbca70..7063cf3ad6 100644
--- a/rules.mk
+++ b/rules.mk
@@ -139,11 +139,11 @@ else
   TOOLCHAIN_DIR_NAME:=toolchain-$(GNU_TARGET_NAME)
 endif
 
-ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_GCC_VERSION_4_8),$(CONFIG_TARGET_uml)),)
-  ifeq ($(CONFIG_GCC_USE_EMBEDDED_PATH_REMAP),y)
-iremap = -fmacro-prefix-map=$(1)=$(2)
-  else
+ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_TARGET_uml)),)
+  ifeq ($(CONFIG_GCC_USE_IREMAP),y)
 iremap = -iremap$(1):$(2)
+  else
+iremap = -ffile-prefix-map=$(1)=$(2)
   endif
 endif
 
diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index 7d7f34210a..3882815d7f 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -21,6 +21,11 @@ choice
 		bool "gcc 9.x"
 endchoice
 
+config GCC_USE_IREMAP
+	default y if ( GCC_USE_VERSION_5 || GCC_USE_VERSION_7 )
+	default n
+	bool
+
 config GCC_USE_GRAPHITE
 	bool
 	prompt "Compile in support for the new Graphite framework in GCC 4.4+" if TOOLCHAINOPTS
diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index 1a86bcb8a6..0658f3d52b 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -10,11 +10,6 @@ config GCC_VERSION_9
 	default y if GCC_USE_VERSION_9
 	bool
 
-config GCC_USE_EMBEDDED_PATH_REMAP
-	default y if ( GCC_VERSION_8 || GCC_VERSION_9 )
-	default n
-	bool
-
 config GCC_VERSION
 	string
 	default "5.5.0"		if GCC_VERSION_5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] toolchain/gcc: switch to version 8 by default

2019-09-30 Thread Paul Spooren

On 28.09.19 11:04, Daniel Golle wrote:

Hi Paul,

On Sat, Sep 28, 2019 at 10:44:48AM -1000, Paul Spooren wrote:

Main motivation for this commit is the introduction of
`-ffile-prefix-map=` which alows reproducible build path.

Imho definitely a good reason to move forward with the switch to GCC 8.


Compiling tested without errors on the following targets:

* ath79
* brcm2708
* brcm63xx
* ixp4xx
* ramips
* sunxi
* x86

Signed-off-by: Paul Spooren 
---
Please let me know if I should compile more targets.

Maybe try apm821xx and octeon as well to cover powerpc and mips64.
I'll give it a shot tomorrow and run-test on ramips/mt76x8.


I compiled some more I couldn't detect any compile problems, however I 
did not yet perform any runtime tests.


The sizes for most images seems slightly smaller, I run a script to 
compare the sizes:


-   -993B /packages/mips_24kc/base/busybox_1.31.0-1_mips_24kc.ipk
+ 21B /packages/mips_24kc/base/dnsmasq_2.80-14_mips_24kc.ipk
-   -222B /packages/mips_24kc/base/dropbear_2019.78-2_mips_24kc.ipk
+    196B 
/packages/mips_24kc/base/firewall_2019-09-18-383eb58f-1_mips_24kc.ipk
+ 16B 
/packages/mips_24kc/base/getrandom_2019-06-16-4df34a4d-3_mips_24kc.ipk
+ 20B 
/packages/mips_24kc/base/hostapd-common_2019-08-08-ca8c2bd2-1_mips_24kc.ipk

+  5B /packages/mips_24kc/base/iw_5.0.1-1_mips_24kc.ipk
-    -16B 
/packages/mips_24kc/base/jshn_2019-06-16-ecf56174-1_mips_24kc.ipk
-    -13B 
/packages/mips_24kc/base/jsonfilter_2018-02-04-c7e938d6-1_mips_24kc.ipk
-    -16B 
/packages/mips_24kc/base/libblobmsg-json_2019-06-16-ecf56174-1_mips_24kc.ipk

+ 57B /packages/mips_24kc/base/libjson-c4_0.13.1-1_mips_24kc.ipk
+ 17B 
/packages/mips_24kc/base/libjson-script_2019-06-16-ecf56174-1_mips_24kc.ipk

-    -35B /packages/mips_24kc/base/libnl-tiny_0.1-5_mips_24kc.ipk
+  4B 
/packages/mips_24kc/base/libubox20170601_2019-06-16-ecf56174-1_mips_24kc.ipk
+ 17B 
/packages/mips_24kc/base/libubus20170705_2018-10-06-221ce7e7-1_mips_24kc.ipk
+ 21B 
/packages/mips_24kc/base/libuci20130104_2019-09-01-415f9e48-3_mips_24kc.ipk
-    -32B 
/packages/mips_24kc/base/libuclient20160123_2019-05-30-3b3e368d-1_mips_24kc.ipk
- -9B 
/packages/mips_24kc/base/logd_2019-06-16-4df34a4d-3_mips_24kc.ipk
-    -38B 
/packages/mips_24kc/base/netifd_2019-08-05-5e02f944-1_mips_24kc.ipk
+ 15B 
/packages/mips_24kc/base/odhcp6c_2019-01-11-e199804b-16_mips_24kc.ipk
-   -209B 
/packages/mips_24kc/base/odhcpd-ipv6only_2019-09-15-1d240094-3_mips_24kc.ipk
+ 26B 
/packages/mips_24kc/base/openwrt-keyring_2019-07-25-8080ef34-1_mips_24kc.ipk
+ 53B 
/packages/mips_24kc/base/opkg_2019-06-14-dcbc142e-1_mips_24kc.ipk
-    -57B 
/packages/mips_24kc/base/ppp-mod-pppoe_2.4.7.git-2019-05-25-2_mips_24kc.ipk
-    -56B 
/packages/mips_24kc/base/ppp_2.4.7.git-2019-05-25-2_mips_24kc.ipk
-    -80B 
/packages/mips_24kc/base/procd_2019-09-21-8e9fb51f-2_mips_24kc.ipk

+ 33B /packages/mips_24kc/base/swconfig_12_mips_24kc.ipk
-   -105B 
/packages/mips_24kc/base/ubox_2019-06-16-4df34a4d-3_mips_24kc.ipk
+ 14B 
/packages/mips_24kc/base/ubus_2018-10-06-221ce7e7-1_mips_24kc.ipk
-    -44B 
/packages/mips_24kc/base/ubusd_2018-10-06-221ce7e7-1_mips_24kc.ipk
+ 13B 
/packages/mips_24kc/base/uci_2019-09-01-415f9e48-3_mips_24kc.ipk
+ 10B 
/packages/mips_24kc/base/uclient-fetch_2019-05-30-3b3e368d-1_mips_24kc.ipk

+ 11B /packages/mips_24kc/base/urandom-seed_1.0-1_mips_24kc.ipk
+ 18B 
/packages/mips_24kc/base/urngd_2019-06-17-c057e177-1_mips_24kc.ipk
+ 86B 
/packages/mips_24kc/base/usign_2019-09-21-f34a383e-1_mips_24kc.ipk

+ 25B /packages/mips_24kc/base/wireless-regdb_2019.06.03_all.ipk
- -12043B 
/packages/mips_24kc/base/wpad-basic_2019-08-08-ca8c2bd2-1_mips_24kc.ipk
-    -103656B 
/targets/ath79/generic/openwrt-ath79-generic-8dev_carambola2-initramfs-kernel.bin
-    -196110B 
/targets/ath79/generic/openwrt-ath79-generic-8dev_carambola2-squashfs-sysupgrade.bin
-    -353608B 
/targets/ath79/generic/openwrt-ath79-generic-adtran_bsap1800-v2-initramfs-kernel.bin
- -65536B 
/targets/ath79/generic/openwrt-ath79-generic-adtran_bsap1800-v2-squashfs-kernel.bin
- -60942B 
/targets/ath79/generic/openwrt-ath79-generic-adtran_bsap1800-v2-squashfs-sysupgrade.bin
-    -353608B 
/targets/ath79/generic/openwrt-ath79-generic-adtran_bsap1840-initramfs-kernel.bin
- -65536B 
/targets/ath79/generic/openwrt-ath79-generic-adtran_bsap1840-squashfs-kernel.bin
- -60942B 
/targets/ath79/generic/openwrt-ath79-generic-adtran_bsap1840-squashfs-sysupgrade.bin
-    -103654B 
/targets/ath79/generic/openwrt-ath79-generic-alfa-network_ap121f-initramfs-kernel.bin
-    -261646B 
/targets/ath79/generic/openwrt-ath79-generic-alfa-network_ap121f-squashfs-sysupgrade.bin
-    -103647B 
/targets/ath79/generic/openwrt-ath79-generic-aruba_ap-105-initramfs-kernel.bin
-    -130574B 

Re: [OpenWrt-Devel] [PATCH] toolchain/gcc: switch to version 8 by default

2019-09-28 Thread Rosen Penev


On Sat, Sep 28, 2019 at 1:44 PM, Paul Spooren  wrote:

Main motivation for this commit is the introduction of
`-ffile-prefix-map=` which alows reproducible build path.

Compiling tested without errors on the following targets:

* ath79
* brcm2708
* brcm63xx
* ixp4xx
* ramips
* sunxi
* x86

Signed-off-by: Paul Spooren 
---
Please let me know if I should compile more targets.

A small note:

Everything should build just fine with GCC8. All of the major problems 
have been patched away. The remaining compilation failures on ARC 
(which uses GCC8) are mostly uClibc-ng related. See: 
https://downloads.openwrt.org/releases/faillogs-19.07/arc_arc700/packages/


GCC9 still needs work (umdns throws an error for example). I also 
remember with GCC9.1 that LuCI would keep crashing (liblua I think).



 toolchain/gcc/Config.in  | 3 +--
 toolchain/gcc/Config.version | 9 -
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index 0977f9b4e7..7d7f34210a 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -2,8 +2,7 @@

 choice
prompt "GCC compiler Version" if TOOLCHAINOPTS
-   default GCC_USE_VERSION_8 if arc
-   default GCC_USE_VERSION_7
+   default GCC_USE_VERSION_8
help
  Select the version of gcc you wish to use.

diff --git a/toolchain/gcc/Config.version 
b/toolchain/gcc/Config.version

index d9732b3e0d..1a86bcb8a6 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -2,9 +2,8 @@ config GCC_VERSION_5
default y if GCC_USE_VERSION_5
bool

-config GCC_VERSION_8
-   default y if GCC_USE_VERSION_8
-   default y if arc && !GCC_USE_VERSION_9
+config GCC_VERSION_7
+   default y if GCC_USE_VERSION_7
bool

 config GCC_VERSION_9
@@ -19,6 +18,6 @@ config GCC_USE_EMBEDDED_PATH_REMAP
 config GCC_VERSION
string
default "5.5.0"   if GCC_VERSION_5
-   default "8.3.0"   if GCC_VERSION_8
+   default "7.4.0"   if GCC_VERSION_7
default "9.2.0"   if GCC_VERSION_9
-   default "7.4.0"
+   default "8.3.0"
--
2.23.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel




___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] toolchain/gcc: switch to version 8 by default

2019-09-28 Thread Daniel Golle
Hi Paul,

On Sat, Sep 28, 2019 at 10:44:48AM -1000, Paul Spooren wrote:
> Main motivation for this commit is the introduction of
> `-ffile-prefix-map=` which alows reproducible build path.

Imho definitely a good reason to move forward with the switch to GCC 8.

> 
> Compiling tested without errors on the following targets:
> 
> * ath79
> * brcm2708
> * brcm63xx
> * ixp4xx
> * ramips
> * sunxi
> * x86
> 
> Signed-off-by: Paul Spooren 
> ---
> Please let me know if I should compile more targets.

Maybe try apm821xx and octeon as well to cover powerpc and mips64.
I'll give it a shot tomorrow and run-test on ramips/mt76x8.


Cheers


Daniel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] toolchain/gcc: switch to version 8 by default

2019-09-28 Thread Paul Spooren
Main motivation for this commit is the introduction of
`-ffile-prefix-map=` which alows reproducible build path.

Compiling tested without errors on the following targets:

* ath79
* brcm2708
* brcm63xx
* ixp4xx
* ramips
* sunxi
* x86

Signed-off-by: Paul Spooren 
---
Please let me know if I should compile more targets.

 toolchain/gcc/Config.in  | 3 +--
 toolchain/gcc/Config.version | 9 -
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index 0977f9b4e7..7d7f34210a 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -2,8 +2,7 @@
 
 choice
prompt "GCC compiler Version" if TOOLCHAINOPTS
-   default GCC_USE_VERSION_8 if arc
-   default GCC_USE_VERSION_7
+   default GCC_USE_VERSION_8
help
  Select the version of gcc you wish to use.
 
diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index d9732b3e0d..1a86bcb8a6 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -2,9 +2,8 @@ config GCC_VERSION_5
default y if GCC_USE_VERSION_5
bool
 
-config GCC_VERSION_8
-   default y if GCC_USE_VERSION_8
-   default y if arc && !GCC_USE_VERSION_9
+config GCC_VERSION_7
+   default y if GCC_USE_VERSION_7
bool
 
 config GCC_VERSION_9
@@ -19,6 +18,6 @@ config GCC_USE_EMBEDDED_PATH_REMAP
 config GCC_VERSION
string
default "5.5.0" if GCC_VERSION_5
-   default "8.3.0" if GCC_VERSION_8
+   default "7.4.0" if GCC_VERSION_7
default "9.2.0" if GCC_VERSION_9
-   default "7.4.0"
+   default "8.3.0"
-- 
2.23.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel