diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 3f013aa2b2..22e2286b8d 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -266,6 +266,40 @@ config KERNEL_FUNCTION_PROFILER depends on KERNEL_FUNCTION_TRACER default n +config KERNEL_IRQSOFF_TRACER + bool "Interrupts-off Latency Tracer" + depends on KERNEL_FTRACE + help + This option measures the time spent in irqs-off critical + sections, with microsecond accuracy. + + The default measurement method is a maximum search, which is + disabled by default and can be runtime (re-)started + via: + + echo 0 > /sys/kernel/debug/tracing/tracing_max_latency + + (Note that kernel size and overhead increase with this option + enabled. This option and the preempt-off timing option can be + used together or separately.) + +config KERNEL_PREEMPT_TRACER + bool "Preemption-off Latency Tracer" + depends on KERNEL_FTRACE + help + This option measures the time spent in preemption-off critical + sections, with microsecond accuracy. + + The default measurement method is a maximum search, which is + disabled by default and can be runtime (re-)started + via: + + echo 0 > /sys/kernel/debug/tracing/tracing_max_latency + + (Note that kernel size and overhead increase with this option + enabled. This option and the irqs-off timing option can be + used together or separately.) + config KERNEL_DEBUG_KERNEL bool default n diff --git a/package/firmware/wireless-regdb/Makefile b/package/firmware/wireless-regdb/Makefile index fc18d159b1..308ca40e22 100644 --- a/package/firmware/wireless-regdb/Makefile +++ b/package/firmware/wireless-regdb/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wireless-regdb -PKG_VERSION:=2020.04.29 +PKG_VERSION:=2020.11.20 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/software/network/wireless-regdb/ -PKG_HASH:=89fd031aed5977c219a71501e144375a10e7c90d1005d5d086ea7972886a2c7a +PKG_HASH:=b4164490d82ff7b0086e812ac42ab27baf57be24324d4c0ee1c5dd6ba27f2a52 PKG_MAINTAINER:=Felix Fietkau diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 8448350acf..396b9c4bb8 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 -PKG_VERSION:=5.8-1 -PKG_RELEASE:=2 -PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.8/ -PKG_HASH:=19b4174d89bf11ee221458e11f1e8dace26558498774b823051156f522d2036b +PKG_VERSION:=5.8.18-1 +PKG_RELEASE:=1 +PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.8.18/ +PKG_HASH:=f04a8172423c6a945fc7d9844b04f33fda9ae574e552f8f18ee3bdfcfb494563 PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION) diff --git a/package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch b/package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch index 89e26af763..020e2bbab5 100644 --- a/package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch +++ b/package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch @@ -1,6 +1,6 @@ --- a/net/wireless/reg.c +++ b/net/wireless/reg.c -@@ -3042,6 +3042,8 @@ void regulatory_hint_country_ie(struct w +@@ -3045,6 +3045,8 @@ void regulatory_hint_country_ie(struct w enum environment_cap env = ENVIRON_ANY; struct regulatory_request *request = NULL, *lr; @@ -9,7 +9,7 @@ /* IE len must be evenly divisible by 2 */ if (country_ie_len & 0x01) return; -@@ -3293,6 +3295,7 @@ static bool is_wiphy_all_set_reg_flag(en +@@ -3296,6 +3298,7 @@ static bool is_wiphy_all_set_reg_flag(en void regulatory_hint_disconnect(void) { diff --git a/package/kernel/mac80211/patches/brcm/861-brcmfmac-workaround-bug-with-some-inconsistent-BSSes.patch b/package/kernel/mac80211/patches/brcm/861-brcmfmac-workaround-bug-with-some-inconsistent-BSSes.patch index 069aab8249..4e79111377 100644 --- a/package/kernel/mac80211/patches/brcm/861-brcmfmac-workaround-bug-with-some-inconsistent-BSSes.patch +++ b/package/kernel/mac80211/patches/brcm/861-brcmfmac-workaround-bug-with-some-inconsistent-BSSes.patch @@ -10,7 +10,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -712,8 +712,36 @@ static struct wireless_dev *brcmf_cfg802 +@@ -714,8 +714,36 @@ static struct wireless_dev *brcmf_cfg802 struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); struct brcmf_pub *drvr = cfg->pub; struct wireless_dev *wdev; diff --git a/package/kernel/mac80211/patches/brcm/862-brcmfmac-Disable-power-management.patch b/package/kernel/mac80211/patches/brcm/862-brcmfmac-Disable-power-management.patch index 8a20ae133a..91bf464ede 100644 --- a/package/kernel/mac80211/patches/brcm/862-brcmfmac-Disable-power-management.patch +++ b/package/kernel/mac80211/patches/brcm/862-brcmfmac-Disable-power-management.patch @@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -2953,6 +2953,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip +@@ -2955,6 +2955,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip * preference in cfg struct to apply this to * FW later while initializing the dongle */ diff --git a/package/kernel/mac80211/patches/brcm/998-survey.patch b/package/kernel/mac80211/patches/brcm/998-survey.patch index bcab2e3f3c..7feca97e9f 100644 --- a/package/kernel/mac80211/patches/brcm/998-survey.patch +++ b/package/kernel/mac80211/patches/brcm/998-survey.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -2905,6 +2905,63 @@ done: +@@ -2907,6 +2907,63 @@ done: } static int @@ -64,7 +64,7 @@ brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *ndev, int idx, u8 *mac, struct station_info *sinfo) { -@@ -2994,6 +3051,7 @@ static s32 brcmf_inform_single_bss(struc +@@ -3002,6 +3059,7 @@ static s32 brcmf_inform_single_bss(struc struct brcmu_chan ch; u16 channel; u32 freq; @@ -72,7 +72,7 @@ u16 notify_capability; u16 notify_interval; u8 *notify_ie; -@@ -3018,6 +3076,17 @@ static s32 brcmf_inform_single_bss(struc +@@ -3026,6 +3084,17 @@ static s32 brcmf_inform_single_bss(struc band = NL80211_BAND_5GHZ; freq = ieee80211_channel_to_frequency(channel, band); @@ -90,7 +90,7 @@ bss_data.chan = ieee80211_get_channel(wiphy, freq); bss_data.scan_width = NL80211_BSS_CHAN_WIDTH_20; bss_data.boottime_ns = ktime_to_ns(ktime_get_boottime()); -@@ -5470,6 +5539,7 @@ static struct cfg80211_ops brcmf_cfg8021 +@@ -5478,6 +5547,7 @@ static struct cfg80211_ops brcmf_cfg8021 .leave_ibss = brcmf_cfg80211_leave_ibss, .get_station = brcmf_cfg80211_get_station, .dump_station = brcmf_cfg80211_dump_station, diff --git a/package/kernel/mac80211/patches/build/050-lib80211_option.patch b/package/kernel/mac80211/patches/build/050-lib80211_option.patch index c6174449c6..b2465b0d7e 100644 --- a/package/kernel/mac80211/patches/build/050-lib80211_option.patch +++ b/package/kernel/mac80211/patches/build/050-lib80211_option.patch @@ -9,7 +9,7 @@ depends on m default n help -@@ -197,18 +197,18 @@ config LIB80211 +@@ -197,19 +197,19 @@ config LIB80211 Drivers should select this themselves if needed. config LIB80211_CRYPT_WEP @@ -22,6 +22,7 @@ - tristate + tristate "lib80211 CCMP support" depends on m + depends on CRYPTO depends on CRYPTO_AES depends on CRYPTO_CCM diff --git a/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch b/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch index e56055caff..2333ca2dad 100644 --- a/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch +++ b/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch @@ -2,7 +2,7 @@ Used for AP+STA support in OpenWrt - preserve AP mode keys across STA reconnects --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1197,7 +1197,6 @@ static int ieee80211_stop_ap(struct wiph +@@ -1198,7 +1198,6 @@ static int ieee80211_stop_ap(struct wiph sdata->vif.bss_conf.ftmr_params = NULL; __sta_info_flush(sdata, true); diff --git a/package/kernel/mac80211/patches/subsys/210-ap_scan.patch b/package/kernel/mac80211/patches/subsys/210-ap_scan.patch index 8ccab8cf66..fccb1ebffa 100644 --- a/package/kernel/mac80211/patches/subsys/210-ap_scan.patch +++ b/package/kernel/mac80211/patches/subsys/210-ap_scan.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2345,7 +2345,7 @@ static int ieee80211_scan(struct wiphy * +@@ -2346,7 +2346,7 @@ static int ieee80211_scan(struct wiphy * * the frames sent while scanning on other channel will be * lost) */ diff --git a/package/kernel/mac80211/patches/subsys/300-mac80211-optimize-skb-resizing.patch b/package/kernel/mac80211/patches/subsys/300-mac80211-optimize-skb-resizing.patch index bcdfa22fff..cb70670e52 100644 --- a/package/kernel/mac80211/patches/subsys/300-mac80211-optimize-skb-resizing.patch +++ b/package/kernel/mac80211/patches/subsys/300-mac80211-optimize-skb-resizing.patch @@ -36,7 +36,7 @@ Signed-off-by: Felix Fietkau void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, --- a/net/mac80211/status.c +++ b/net/mac80211/status.c -@@ -843,6 +843,11 @@ void ieee80211_tx_monitor(struct ieee802 +@@ -846,6 +846,11 @@ void ieee80211_tx_monitor(struct ieee802 struct net_device *prev_dev = NULL; int rtap_len; diff --git a/package/kernel/mac80211/patches/subsys/307-mac80211-add-a-function-for-running-rx-without-passi.patch b/package/kernel/mac80211/patches/subsys/307-mac80211-add-a-function-for-running-rx-without-passi.patch index 1bcb41461e..802d57497c 100644 --- a/package/kernel/mac80211/patches/subsys/307-mac80211-add-a-function-for-running-rx-without-passi.patch +++ b/package/kernel/mac80211/patches/subsys/307-mac80211-add-a-function-for-running-rx-without-passi.patch @@ -58,7 +58,7 @@ Signed-off-by: Felix Fietkau struct ieee80211_sub_if_data *sdata; --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -2578,8 +2578,8 @@ static void ieee80211_deliver_skb_to_loc +@@ -2579,8 +2579,8 @@ static void ieee80211_deliver_skb_to_loc memset(skb->cb, 0, sizeof(skb->cb)); /* deliver to local stack */ @@ -69,7 +69,7 @@ Signed-off-by: Felix Fietkau else netif_receive_skb(skb); } -@@ -3869,7 +3869,6 @@ void ieee80211_release_reorder_timeout(s +@@ -3870,7 +3870,6 @@ void ieee80211_release_reorder_timeout(s /* This is OK -- must be QoS data frame */ .security_idx = tid, .seqno_idx = tid, @@ -77,7 +77,7 @@ Signed-off-by: Felix Fietkau }; struct tid_ampdu_rx *tid_agg_rx; -@@ -4479,8 +4478,8 @@ static bool ieee80211_invoke_fast_rx(str +@@ -4480,8 +4479,8 @@ static bool ieee80211_invoke_fast_rx(str /* deliver to local stack */ skb->protocol = eth_type_trans(skb, fast_rx->dev); memset(skb->cb, 0, sizeof(skb->cb)); @@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau else netif_receive_skb(skb); -@@ -4547,7 +4546,7 @@ static bool ieee80211_prepare_and_rx_han +@@ -4548,7 +4547,7 @@ static bool ieee80211_prepare_and_rx_han static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta, struct sk_buff *skb, @@ -97,7 +97,7 @@ Signed-off-by: Felix Fietkau { struct ieee80211_local *local = hw_to_local(hw); struct ieee80211_sub_if_data *sdata; -@@ -4562,7 +4561,7 @@ static void __ieee80211_rx_handle_packet +@@ -4563,7 +4562,7 @@ static void __ieee80211_rx_handle_packet memset(&rx, 0, sizeof(rx)); rx.skb = skb; rx.local = local; @@ -106,7 +106,7 @@ Signed-off-by: Felix Fietkau if (ieee80211_is_data(fc) || ieee80211_is_mgmt(fc)) I802_DEBUG_INC(local->dot11ReceivedFragmentCount); -@@ -4670,8 +4669,8 @@ static void __ieee80211_rx_handle_packet +@@ -4671,8 +4670,8 @@ static void __ieee80211_rx_handle_packet * This is the receive path handler. It is called by a low level driver when an * 802.11 MPDU is received from the hardware. */ @@ -117,7 +117,7 @@ Signed-off-by: Felix Fietkau { struct ieee80211_local *local = hw_to_local(hw); struct ieee80211_rate *rate = NULL; -@@ -4763,36 +4762,53 @@ void ieee80211_rx_napi(struct ieee80211_ +@@ -4764,36 +4763,53 @@ void ieee80211_rx_napi(struct ieee80211_ status->rx_flags = 0; /* diff --git a/package/kernel/mac80211/patches/subsys/310-mac80211-reduce-packet-loss-event-false-positives.patch b/package/kernel/mac80211/patches/subsys/310-mac80211-reduce-packet-loss-event-false-positives.patch deleted file mode 100644 index 62f2419dd3..0000000000 --- a/package/kernel/mac80211/patches/subsys/310-mac80211-reduce-packet-loss-event-false-positives.patch +++ /dev/null @@ -1,116 +0,0 @@ -From: Felix Fietkau -Date: Sat, 8 Aug 2020 19:20:02 +0200 -Subject: [PATCH] mac80211: reduce packet loss event false positives - -When running a large number of packets per second with a high data rate -and long A-MPDUs, the packet loss threshold can be reached very quickly -when the link conditions change. This frequently shows up as spurious -disconnects. -Mitigate false positives by using a similar logic for regular stations -as the one being used for TDLS, though with a more aggressive timeout. -Packet loss events are only reported if no ACK was received for a second. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/sta_info.h -+++ b/net/mac80211/sta_info.h -@@ -522,7 +522,7 @@ struct ieee80211_sta_rx_stats { - * @status_stats.retry_failed: # of frames that failed after retry - * @status_stats.retry_count: # of retries attempted - * @status_stats.lost_packets: # of lost packets -- * @status_stats.last_tdls_pkt_time: timestamp of last TDLS packet -+ * @status_stats.last_pkt_time: timestamp of last ACKed packet - * @status_stats.msdu_retries: # of MSDU retries - * @status_stats.msdu_failed: # of failed MSDUs - * @status_stats.last_ack: last ack timestamp (jiffies) -@@ -595,7 +595,7 @@ struct sta_info { - unsigned long filtered; - unsigned long retry_failed, retry_count; - unsigned int lost_packets; -- unsigned long last_tdls_pkt_time; -+ unsigned long last_pkt_time; - u64 msdu_retries[IEEE80211_NUM_TIDS + 1]; - u64 msdu_failed[IEEE80211_NUM_TIDS + 1]; - unsigned long last_ack; ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -757,12 +757,16 @@ static void ieee80211_report_used_skb(st - * - current throughput (higher value for higher tpt)? - */ - #define STA_LOST_PKT_THRESHOLD 50 -+#define STA_LOST_PKT_TIME HZ /* 1 sec since last ACK */ - #define STA_LOST_TDLS_PKT_THRESHOLD 10 - #define STA_LOST_TDLS_PKT_TIME (10*HZ) /* 10secs since last ACK */ - - static void ieee80211_lost_packet(struct sta_info *sta, - struct ieee80211_tx_info *info) - { -+ unsigned long pkt_time = STA_LOST_PKT_TIME; -+ unsigned int pkt_thr = STA_LOST_PKT_THRESHOLD; -+ - /* If driver relies on its own algorithm for station kickout, skip - * mac80211 packet loss mechanism. - */ -@@ -775,21 +779,20 @@ static void ieee80211_lost_packet(struct - return; - - sta->status_stats.lost_packets++; -- if (!sta->sta.tdls && -- sta->status_stats.lost_packets < STA_LOST_PKT_THRESHOLD) -- return; -+ if (sta->sta.tdls) { -+ pkt_time = STA_LOST_TDLS_PKT_TIME; -+ pkt_thr = STA_LOST_PKT_THRESHOLD; -+ } - - /* - * If we're in TDLS mode, make sure that all STA_LOST_TDLS_PKT_THRESHOLD - * of the last packets were lost, and that no ACK was received in the - * last STA_LOST_TDLS_PKT_TIME ms, before triggering the CQM packet-loss - * mechanism. -+ * For non-TDLS, use STA_LOST_PKT_THRESHOLD and STA_LOST_PKT_TIME - */ -- if (sta->sta.tdls && -- (sta->status_stats.lost_packets < STA_LOST_TDLS_PKT_THRESHOLD || -- time_before(jiffies, -- sta->status_stats.last_tdls_pkt_time + -- STA_LOST_TDLS_PKT_TIME))) -+ if (sta->status_stats.lost_packets < pkt_thr || -+ !time_after(jiffies, sta->status_stats.last_pkt_time + pkt_time)) - return; - - cfg80211_cqm_pktloss_notify(sta->sdata->dev, sta->sta.addr, -@@ -1042,9 +1045,7 @@ static void __ieee80211_tx_status(struct - sta->status_stats.lost_packets = 0; - - /* Track when last TDLS packet was ACKed */ -- if (test_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH)) -- sta->status_stats.last_tdls_pkt_time = -- jiffies; -+ sta->status_stats.last_pkt_time = jiffies; - } else if (noack_success) { - /* nothing to do here, do not account as lost */ - } else { -@@ -1177,9 +1178,8 @@ void ieee80211_tx_status_ext(struct ieee - if (sta->status_stats.lost_packets) - sta->status_stats.lost_packets = 0; - -- /* Track when last TDLS packet was ACKed */ -- if (test_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH)) -- sta->status_stats.last_tdls_pkt_time = jiffies; -+ /* Track when last packet was ACKed */ -+ sta->status_stats.last_pkt_time = jiffies; - } else if (test_sta_flag(sta, WLAN_STA_PS_STA)) { - return; - } else if (noack_success) { -@@ -1268,8 +1268,7 @@ void ieee80211_tx_status_8023(struct iee - if (sta->status_stats.lost_packets) - sta->status_stats.lost_packets = 0; - -- if (test_sta_flag(sta, WLAN_STA_TDLS_PEER_AUTH)) -- sta->status_stats.last_tdls_pkt_time = jiffies; -+ sta->status_stats.last_pkt_time = jiffies; - } else { - ieee80211_lost_packet(sta, info); - } diff --git a/package/kernel/mac80211/patches/subsys/313-mac80211-improve-AQL-aggregation-estimation-for-low-.patch b/package/kernel/mac80211/patches/subsys/313-mac80211-improve-AQL-aggregation-estimation-for-low-.patch index 7f7c75db59..a5df07e58d 100644 --- a/package/kernel/mac80211/patches/subsys/313-mac80211-improve-AQL-aggregation-estimation-for-low-.patch +++ b/package/kernel/mac80211/patches/subsys/313-mac80211-improve-AQL-aggregation-estimation-for-low-.patch @@ -55,12 +55,12 @@ Signed-off-by: Felix Fietkau + agg_shift = 3; + else + agg_shift = 4; - -- return airtime; ++ + duration *= len; + duration /= AVG_PKT_SIZE; + duration /= 1024; -+ + +- return airtime; + return duration + (overhead >> agg_shift); } diff --git a/package/kernel/mac80211/patches/subsys/319-mac80211-reduce-duplication-in-tx-status-functions.patch b/package/kernel/mac80211/patches/subsys/319-mac80211-reduce-duplication-in-tx-status-functions.patch index 8b664d6895..e13723b160 100644 --- a/package/kernel/mac80211/patches/subsys/319-mac80211-reduce-duplication-in-tx-status-functions.patch +++ b/package/kernel/mac80211/patches/subsys/319-mac80211-reduce-duplication-in-tx-status-functions.patch @@ -67,12 +67,12 @@ Signed-off-by: Felix Fietkau if (!acked && !noack_success) - sta->status_stats.retry_failed++; - sta->status_stats.retry_count += retry_count; -- ++ sta->status_stats.msdu_failed[tid]++; + - if (ieee80211_is_data_present(fc)) { - if (!acked && !noack_success) - sta->status_stats.msdu_failed[tid]++; -+ sta->status_stats.msdu_failed[tid]++; - +- - sta->status_stats.msdu_retries[tid] += - retry_count; - } diff --git a/package/kernel/mac80211/patches/subsys/321-mac80211-optimize-station-connection-monitor.patch b/package/kernel/mac80211/patches/subsys/321-mac80211-optimize-station-connection-monitor.patch index ed9efb2b0d..f8287c53a7 100644 --- a/package/kernel/mac80211/patches/subsys/321-mac80211-optimize-station-connection-monitor.patch +++ b/package/kernel/mac80211/patches/subsys/321-mac80211-optimize-station-connection-monitor.patch @@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -1811,9 +1811,6 @@ ieee80211_rx_h_sta_process(struct ieee80 +@@ -1812,9 +1812,6 @@ ieee80211_rx_h_sta_process(struct ieee80 sta->rx_stats.last_rate = sta_stats_encode_rate(status); } @@ -122,7 +122,7 @@ Signed-off-by: Felix Fietkau sta->rx_stats.fragments++; u64_stats_update_begin(&rx->sta->rx_stats.syncp); -@@ -4148,7 +4145,6 @@ void ieee80211_check_fast_rx(struct sta_ +@@ -4149,7 +4146,6 @@ void ieee80211_check_fast_rx(struct sta_ fastrx.sa_offs = offsetof(struct ieee80211_hdr, addr2); fastrx.expected_ds_bits = 0; } else { @@ -130,7 +130,7 @@ Signed-off-by: Felix Fietkau fastrx.da_offs = offsetof(struct ieee80211_hdr, addr1); fastrx.sa_offs = offsetof(struct ieee80211_hdr, addr3); fastrx.expected_ds_bits = -@@ -4378,11 +4374,6 @@ static bool ieee80211_invoke_fast_rx(str +@@ -4379,11 +4375,6 @@ static bool ieee80211_invoke_fast_rx(str pskb_trim(skb, skb->len - fast_rx->icv_len)) goto drop; diff --git a/package/kernel/mac80211/patches/subsys/322-mac80211-swap-NEED_TXPROCESSING-and-HW_80211_ENCAP-t.patch b/package/kernel/mac80211/patches/subsys/322-mac80211-swap-NEED_TXPROCESSING-and-HW_80211_ENCAP-t.patch index b9069ef9b8..8505ce56f6 100644 --- a/package/kernel/mac80211/patches/subsys/322-mac80211-swap-NEED_TXPROCESSING-and-HW_80211_ENCAP-t.patch +++ b/package/kernel/mac80211/patches/subsys/322-mac80211-swap-NEED_TXPROCESSING-and-HW_80211_ENCAP-t.patch @@ -129,7 +129,7 @@ Signed-off-by: Felix Fietkau } --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c -@@ -2896,7 +2896,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80 +@@ -2897,7 +2897,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80 fwd_hdr->frame_control &= ~cpu_to_le16(IEEE80211_FCTL_RETRY); info = IEEE80211_SKB_CB(fwd_skb); memset(info, 0, sizeof(*info)); diff --git a/package/kernel/mac80211/patches/subsys/326-mac80211-notify-the-driver-when-a-sta-uses-4-address.patch b/package/kernel/mac80211/patches/subsys/326-mac80211-notify-the-driver-when-a-sta-uses-4-address.patch index 5ad5ac6a78..aa166c6431 100644 --- a/package/kernel/mac80211/patches/subsys/326-mac80211-notify-the-driver-when-a-sta-uses-4-address.patch +++ b/package/kernel/mac80211/patches/subsys/326-mac80211-notify-the-driver-when-a-sta-uses-4-address.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau /** --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1693,6 +1693,7 @@ static int ieee80211_change_station(stru +@@ -1694,6 +1694,7 @@ static int ieee80211_change_station(stru rcu_assign_pointer(vlansdata->u.vlan.sta, sta); __ieee80211_check_fast_rx_iface(vlansdata); diff --git a/package/kernel/mac80211/patches/subsys/331-mac80211-do-not-allow-bigger-VHT-MPDUs-than-the-hard.patch b/package/kernel/mac80211/patches/subsys/331-mac80211-do-not-allow-bigger-VHT-MPDUs-than-the-hard.patch deleted file mode 100644 index a799d96250..0000000000 --- a/package/kernel/mac80211/patches/subsys/331-mac80211-do-not-allow-bigger-VHT-MPDUs-than-the-hard.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Felix Fietkau -Date: Thu, 17 Sep 2020 12:07:19 +0200 -Subject: [PATCH] mac80211: do not allow bigger VHT MPDUs than the hardware - supports - -Limit maximum VHT MPDU size by local capability - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/vht.c -+++ b/net/mac80211/vht.c -@@ -168,10 +168,7 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru - /* take some capabilities as-is */ - cap_info = le32_to_cpu(vht_cap_ie->vht_cap_info); - vht_cap->cap = cap_info; -- vht_cap->cap &= IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 | -- IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 | -- IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 | -- IEEE80211_VHT_CAP_RXLDPC | -+ vht_cap->cap &= IEEE80211_VHT_CAP_RXLDPC | - IEEE80211_VHT_CAP_VHT_TXOP_PS | - IEEE80211_VHT_CAP_HTC_VHT | - IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK | -@@ -180,6 +177,9 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru - IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN | - IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN; - -+ vht_cap->cap |= min_t(u32, cap_info & IEEE80211_VHT_CAP_MAX_MPDU_MASK, -+ own_cap.cap & IEEE80211_VHT_CAP_MAX_MPDU_MASK); -+ - /* and some based on our own capabilities */ - switch (own_cap.cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK) { - case IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ: diff --git a/package/kernel/mac80211/patches/subsys/336-mac80211-do-not-drop-tx-nulldata-packets-on-encrypte.patch b/package/kernel/mac80211/patches/subsys/336-mac80211-do-not-drop-tx-nulldata-packets-on-encrypte.patch new file mode 100644 index 0000000000..378c37455d --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/336-mac80211-do-not-drop-tx-nulldata-packets-on-encrypte.patch @@ -0,0 +1,25 @@ +From: Felix Fietkau +Date: Fri, 18 Dec 2020 20:08:06 +0100 +Subject: [PATCH] mac80211: do not drop tx nulldata packets on encrypted links + +ieee80211_tx_h_select_key drops any non-mgmt packets without a key when +encryption is used. This is wrong for nulldata packets that can't be +encrypted and are sent out for probing clients and indicating 4-address +mode. + +Reported-by: Sebastian Gottschall +Fixes: a0761a301746 ("mac80211: drop data frames without key on encrypted links") +Signed-off-by: Felix Fietkau +--- + +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -657,7 +657,7 @@ ieee80211_tx_h_select_key(struct ieee802 + if (!skip_hw && tx->key && + tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) + info->control.hw_key = &tx->key->conf; +- } else if (!ieee80211_is_mgmt(hdr->frame_control) && tx->sta && ++ } else if (ieee80211_is_data_present(hdr->frame_control) && tx->sta && + test_sta_flag(tx->sta, WLAN_STA_USES_ENCRYPTION)) { + return TX_DROP; + } diff --git a/package/kernel/mac80211/patches/subsys/370-mac80211-fix-misplaced-while-instead-of-if.patch b/package/kernel/mac80211/patches/subsys/370-mac80211-fix-misplaced-while-instead-of-if.patch deleted file mode 100644 index 38144013f0..0000000000 --- a/package/kernel/mac80211/patches/subsys/370-mac80211-fix-misplaced-while-instead-of-if.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 5981fe5b0529ba25d95f37d7faa434183ad618c5 Mon Sep 17 00:00:00 2001 -From: Johannes Berg -Date: Mon, 3 Aug 2020 11:02:10 +0200 -Subject: [PATCH] mac80211: fix misplaced while instead of if - -This never was intended to be a 'while' loop, it should've -just been an 'if' instead of 'while'. Fix this. - -I noticed this while applying another patch from Ben that -intended to fix a busy loop at this spot. - -Cc: stable@vger.kernel.org -Fixes: b16798f5b907 ("mac80211: mark station unauthorized before key removal") -Reported-by: Ben Greear -Link: https://lore.kernel.org/r/20200803110209.253009ae41ff.I3522aad099392b31d5cf2dcca34cbac7e5832dde@changeid -Signed-off-by: Johannes Berg ---- - net/mac80211/sta_info.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/net/mac80211/sta_info.c -+++ b/net/mac80211/sta_info.c -@@ -1051,7 +1051,7 @@ static void __sta_info_destroy_part2(str - might_sleep(); - lockdep_assert_held(&local->sta_mtx); - -- while (sta->sta_state == IEEE80211_STA_AUTHORIZED) { -+ if (sta->sta_state == IEEE80211_STA_AUTHORIZED) { - ret = sta_info_move_state(sta, IEEE80211_STA_ASSOC); - WARN_ON_ONCE(ret); - } diff --git a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch index 8db3a758a1..6abf3a1261 100644 --- a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch +++ b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch @@ -57,7 +57,7 @@ __NL80211_ATTR_AFTER_LAST, --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2611,6 +2611,19 @@ static int ieee80211_get_tx_power(struct +@@ -2612,6 +2612,19 @@ static int ieee80211_get_tx_power(struct return 0; } @@ -77,7 +77,7 @@ static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev, const u8 *addr) { -@@ -4041,6 +4054,7 @@ const struct cfg80211_ops mac80211_confi +@@ -4042,6 +4055,7 @@ const struct cfg80211_ops mac80211_confi .set_wiphy_params = ieee80211_set_wiphy_params, .set_tx_power = ieee80211_set_tx_power, .get_tx_power = ieee80211_get_tx_power, @@ -137,7 +137,7 @@ }; /* policy for the key attributes */ -@@ -3136,6 +3137,20 @@ static int nl80211_set_wiphy(struct sk_b +@@ -3139,6 +3140,20 @@ static int nl80211_set_wiphy(struct sk_b if (result) return result; } diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 0cfb5d3fbf..fd39d7a561 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2020-09-23 -PKG_SOURCE_VERSION:=b22977c2727db7fea8d487573edb3aa668d8309d -PKG_MIRROR_HASH:=4182823ec5a97d842e7404b3c8139de8af4f35948008890d50e4dad95add996b +PKG_SOURCE_DATE:=2020-12-18 +PKG_SOURCE_VERSION:=4a90fdf6105e1517897aac1b451b73a54b3d9d0d +PKG_MIRROR_HASH:=1ea778584d0fabbc75eb3b2f42aba0c0f2f5e6f0f5ae3084c17b9f02876ebdcc PKG_MAINTAINER:=Felix Fietkau PKG_BUILD_PARALLEL:=1 diff --git a/package/kernel/nat46/Makefile b/package/kernel/nat46/Makefile index dd9d606d27..c2bf582cfa 100644 --- a/package/kernel/nat46/Makefile +++ b/package/kernel/nat46/Makefile @@ -3,7 +3,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=nat46 -PKG_MIRROR_HASH:=d0bc80038cadeb7e857118e8d6bae242670ab27377af49f74bad494e0e5da598 +PKG_MIRROR_HASH:=5cc35d11ad6937734f830be5e260eb17a7b0561e37f538e5fc99026d0f2ea517 PKG_SOURCE_URL:=https://github.com/ayourtch/nat46.git PKG_SOURCE_DATE:=2020-08-17 PKG_SOURCE_PROTO:=git diff --git a/package/libs/libunwind/Makefile b/package/libs/libunwind/Makefile index 994ee97a17..89e6f84ff5 100644 --- a/package/libs/libunwind/Makefile +++ b/package/libs/libunwind/Makefile @@ -9,22 +9,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libunwind -PKG_VERSION:=1.3.1 +PKG_VERSION:=1.5.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME) -PKG_HASH:=43997a3939b6ccdf2f669b50fdb8a4d3205374728c2923ddc2354c65260214f8 -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 +PKG_HASH:=90337653d92d4a13de590781371c604f9031cdb50520366aa1e3a91e1efb1017 +PKG_MAINTAINER:=Yousong Zhou PKG_LICENSE:=X11 PKG_LICENSE_FILES:=LICENSE PKG_CPE_ID:=cpe:/a:libunwind_project:libunwind -PKG_MAINTAINER:=Yousong Zhou +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 -PKG_SSP:=0 include $(INCLUDE_DIR)/package.mk define Package/libunwind @@ -32,7 +32,7 @@ define Package/libunwind CATEGORY:=Libraries TITLE:=The libunwind project URL:=http://www.nongnu.org/libunwind/ - DEPENDS:=@((mips||mipsel||x86_64||arm||aarch64)||(USE_GLIBC&&(powerpc||i386))) + DEPENDS:=@((mips||mipsel||x86_64||arm||aarch64)||(USE_GLIBC&&(powerpc||i386))) +zlib ABI_VERSION:=8 endef @@ -43,8 +43,9 @@ endef CONFIGURE_ARGS += \ --disable-documentation \ --disable-tests \ - --enable-minidebuginfo=no \ + --disable-minidebuginfo +TARGET_LDFLAGS += $(if $(CONFIG_USE_MUSL),-lssp_nonshared) define Package/libunwind/install $(INSTALL_DIR) $(1)/usr/lib diff --git a/package/libs/libunwind/patches/002-fix-building-getcontext_S.patch b/package/libs/libunwind/patches/002-fix-building-getcontext_S.patch index 10b1dd1d90..d88594e6e7 100644 --- a/package/libs/libunwind/patches/002-fix-building-getcontext_S.patch +++ b/package/libs/libunwind/patches/002-fix-building-getcontext_S.patch @@ -1,6 +1,5 @@ -diff -uprN a/src/mips/getcontext.S b/src/mips/getcontext.S ---- a/src/mips/getcontext.S 2012-10-06 12:54:38.000000000 +0800 -+++ b/src/mips/getcontext.S 2016-06-08 13:35:25.033051679 +0800 +--- a/src/mips/getcontext.S ++++ b/src/mips/getcontext.S @@ -24,12 +24,12 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ @@ -16,4 +15,3 @@ diff -uprN a/src/mips/getcontext.S b/src/mips/getcontext.S # define OFFSET 4 # else # define OFFSET 0 - diff --git a/package/libs/libunwind/patches/003-fix-missing-ef_reg-defs-with-musl.patch b/package/libs/libunwind/patches/003-fix-missing-ef_reg-defs-with-musl.patch index 465abb4ce0..1a26dcd895 100644 --- a/package/libs/libunwind/patches/003-fix-missing-ef_reg-defs-with-musl.patch +++ b/package/libs/libunwind/patches/003-fix-missing-ef_reg-defs-with-musl.patch @@ -1,7 +1,6 @@ -diff -uprN a/include/libunwind-mips.h b/include/libunwind-mips.h ---- a/include/libunwind-mips.h 2012-10-06 12:54:38.000000000 +0800 -+++ b/include/libunwind-mips.h 2016-06-08 13:55:55.029436442 +0800 -@@ -111,6 +111,42 @@ typedef enum +--- a/include/libunwind-mips.h ++++ b/include/libunwind-mips.h +@@ -114,6 +114,42 @@ typedef enum } mips_regnum_t; @@ -44,4 +43,3 @@ diff -uprN a/include/libunwind-mips.h b/include/libunwind-mips.h typedef enum { UNW_MIPS_ABI_O32, - diff --git a/package/utils/e2fsprogs/Makefile b/package/utils/e2fsprogs/Makefile index 8f3142b105..43ad42602a 100644 --- a/package/utils/e2fsprogs/Makefile +++ b/package/utils/e2fsprogs/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=e2fsprogs PKG_VERSION:=1.45.6 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/ diff --git a/package/utils/e2fsprogs/patches/003-build-Add-SYSLIBS-to-e4crypt-linking.patch b/package/utils/e2fsprogs/patches/003-build-Add-SYSLIBS-to-e4crypt-linking.patch new file mode 100644 index 0000000000..dad71cf0b3 --- /dev/null +++ b/package/utils/e2fsprogs/patches/003-build-Add-SYSLIBS-to-e4crypt-linking.patch @@ -0,0 +1,28 @@ +From e33ecf1595e390b2657018442c68ae824b3e13b4 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Tue, 15 Dec 2020 23:58:53 +0100 +Subject: [PATCH e2fsprogs] build: Add SYSLIBS to e4crypt linking + +The $(SYSLIBS) was missing when linking the e4crypt application. This is +available in the e4crypt.profiled variant, so I assume this was just +missing in the normal variant and is not left out intentionally. + +This fixes building e2fsprogrs with -fsanitize=undefined in the global +CFLAGS nad LDFLAGS. + +Signed-off-by: Hauke Mehrtens +--- + misc/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/misc/Makefile.in ++++ b/misc/Makefile.in +@@ -242,7 +242,7 @@ e4defrag: $(E4DEFRAG_OBJS) $(DEPLIBS) + e4crypt: $(E4CRYPT_OBJS) $(DEPLIBS) $(DEPSTATIC_LIBUUID) + $(E) " LD $@" + $(Q) $(CC) $(ALL_LDFLAGS) -o e4crypt $(E4CRYPT_OBJS) \ +- $(LIBUUID) $(LIBS) ++ $(LIBUUID) $(LIBS) $(SYSLIBS) + + e4defrag.profiled: $(E4DEFRAG_OBJS) $(PROFILED_DEPLIBS) + $(E) " LD $@" diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile index 05ceaa413e..31a66493e9 100644 --- a/package/utils/util-linux/Makefile +++ b/package/utils/util-linux/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=util-linux -PKG_VERSION:=2.36 -PKG_RELEASE:=2 +PKG_VERSION:=2.36.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.36 -PKG_HASH:=9e4b1c67eb13b9b67feb32ae1dc0d50e08ce9e5d82e1cccd0ee771ad2fa9e0b1 +PKG_HASH:=09fac242172cd8ec27f0739d8d192402c69417617091d8c6e974841568f37eed PKG_CPE_ID:=cpe:/a:kernel:util-linux PKG_LICENSE:=GPL-2.0 diff --git a/package/utils/util-linux/patches/003-fix_pkgconfig_files.patch b/package/utils/util-linux/patches/003-fix_pkgconfig_files.patch index 3f97eaf737..4797f7d159 100644 --- a/package/utils/util-linux/patches/003-fix_pkgconfig_files.patch +++ b/package/utils/util-linux/patches/003-fix_pkgconfig_files.patch @@ -10,7 +10,7 @@ endif # BUILD_LIBUUID --- a/configure.ac +++ b/configure.ac -@@ -2586,18 +2586,23 @@ AC_CONFIG_HEADERS([config.h]) +@@ -2522,18 +2522,23 @@ AC_CONFIG_HEADERS([config.h]) # AC_CONFIG_FILES([ Makefile diff --git a/package/utils/util-linux/patches/200-musl-1.2.x.patch b/package/utils/util-linux/patches/200-musl-1.2.x.patch deleted file mode 100644 index 658b3ead1d..0000000000 --- a/package/utils/util-linux/patches/200-musl-1.2.x.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 69e4fbfbfd9c42af508954d9fb985c5c7b657784 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Tue, 11 Aug 2020 11:02:31 +0200 -Subject: [PATCH] hwclock: add fallback if SYS_settimeofday does not exist - -It seems Musl-C removes SYS_settimeofday macro at all. - -Addresses: https://github.com/karelzak/util-linux/commit/9c6139a72017cecb9145e46102152cb4f456ada6#commitcomment-41290951 -Signed-off-by: Karel Zak ---- - sys-utils/hwclock.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/sys-utils/hwclock.c -+++ b/sys-utils/hwclock.c -@@ -675,6 +675,10 @@ display_time(struct timeval hwctime) - */ - #define __set_time(_tv) settimeofday(_tv, NULL) - -+#if !defined(SYS_settimeofday) && defined(__NR_settimeofday) -+# define SYS_settimeofday __NR_settimeofday -+#endif -+ - static inline int __set_timezone(const struct timezone *tz) - { - #ifdef SYS_settimeofday diff --git a/target/linux/ath79/dts/qca9557_8dev_rambutan.dts b/target/linux/ath79/dts/qca9557_8dev_rambutan.dts index 3b714a2fb3..ce46555148 100644 --- a/target/linux/ath79/dts/qca9557_8dev_rambutan.dts +++ b/target/linux/ath79/dts/qca9557_8dev_rambutan.dts @@ -87,7 +87,6 @@ pll-data = <0x17000000 0x101 0x1313>; phy-handle = <&phy1>; - phy-mode = "sgmii"; qca955x-sgmii-fixup; mtd-mac-address = <&art 0x6>; }; diff --git a/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts b/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts index b8429fed45..86f889a5dc 100644 --- a/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts +++ b/target/linux/ath79/dts/qca9558_dlink_dap-2695-a1.dts @@ -133,7 +133,6 @@ status = "okay"; phy-handle = <&phy0>; - phy-mode = "rgmii"; pll-data = <0x56000000 0x00000101 0x00001616>; fixed-link { @@ -146,7 +145,6 @@ status = "okay"; phy-mask = <0>; - phy-mode = "sgmii"; pll-data = <0x03000101 0x00000101 0x00001616>; fixed-link { diff --git a/target/linux/ath79/dts/qca9558_engenius_ecb1750.dts b/target/linux/ath79/dts/qca9558_engenius_ecb1750.dts index 9f2c9c048b..159ccc1872 100644 --- a/target/linux/ath79/dts/qca9558_engenius_ecb1750.dts +++ b/target/linux/ath79/dts/qca9558_engenius_ecb1750.dts @@ -129,7 +129,6 @@ pll-data = <0x9a000000 0x80000101 0x80001313>; phy-handle = <&phy5>; - phy-mode = "rgmii"; gmac-config { device = <&gmac>; diff --git a/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts b/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts index 5788623025..5be931bcd0 100644 --- a/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts +++ b/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts @@ -179,7 +179,6 @@ ð1 { status = "okay"; - phy-mode = "sgmii"; pll-data = <0x03000101 0x00000101 0x00001616>; mtd-mac-address = <&art 0x6>; diff --git a/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts b/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts index fabfe14cf8..8cea2ff401 100644 --- a/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts +++ b/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts @@ -152,7 +152,6 @@ pll-data = <0x82000101 0x80000101 0x80001313>; phy-handle = <&phy4>; - phy-mode = "rgmii"; }; ð1 { @@ -161,5 +160,4 @@ pll-data = <0x03000101 0x80000101 0x80001313>; phy-handle = <&phy1>; - phy-mode = "sgmii"; }; diff --git a/target/linux/generic/pending-5.4/770-13-net-ethernet-mtk_eth_soc-fix-parsing-packets-in-GDM.patch b/target/linux/generic/pending-5.4/770-13-net-ethernet-mtk_eth_soc-fix-parsing-packets-in-GDM.patch index 9ef675dcd1..16993b9d80 100644 --- a/target/linux/generic/pending-5.4/770-13-net-ethernet-mtk_eth_soc-fix-parsing-packets-in-GDM.patch +++ b/target/linux/generic/pending-5.4/770-13-net-ethernet-mtk_eth_soc-fix-parsing-packets-in-GDM.patch @@ -18,15 +18,7 @@ Signed-off-by: Felix Fietkau #include "mtk_eth_soc.h" -@@ -1246,6 +1247,7 @@ static int mtk_poll_rx(struct napi_struc - unsigned int pktlen; - dma_addr_t dma_addr; - int mac; -+ u16 hash; - - ring = mtk_get_rx_ring(eth); - if (unlikely(!ring)) -@@ -1259,13 +1261,12 @@ static int mtk_poll_rx(struct napi_struc +@@ -1259,13 +1260,12 @@ static int mtk_poll_rx(struct napi_struc break; /* find out which mac the packet come from. values start at 1 */ @@ -45,7 +37,7 @@ Signed-off-by: Felix Fietkau if (unlikely(mac < 0 || mac >= MTK_MAC_COUNT || !eth->netdev[mac])) -@@ -2247,6 +2248,9 @@ static void mtk_gdm_config(struct mtk_et +@@ -2247,6 +2247,9 @@ static void mtk_gdm_config(struct mtk_et val |= config; diff --git a/target/linux/generic/pending-5.4/770-14-net-ethernet-mtk_eth_soc-set-PPE-flow-hash-as-skb-ha.patch b/target/linux/generic/pending-5.4/770-14-net-ethernet-mtk_eth_soc-set-PPE-flow-hash-as-skb-ha.patch index 60ac12c013..68ae19ec6e 100644 --- a/target/linux/generic/pending-5.4/770-14-net-ethernet-mtk_eth_soc-set-PPE-flow-hash-as-skb-ha.patch +++ b/target/linux/generic/pending-5.4/770-14-net-ethernet-mtk_eth_soc-set-PPE-flow-hash-as-skb-ha.patch @@ -10,13 +10,31 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -1316,6 +1316,10 @@ static int mtk_poll_rx(struct napi_struc +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + + #include "mtk_eth_soc.h" +@@ -1246,6 +1247,7 @@ static int mtk_poll_rx(struct napi_struc + struct net_device *netdev; + unsigned int pktlen; + dma_addr_t dma_addr; ++ u32 hash; + int mac; + + ring = mtk_get_rx_ring(eth); +@@ -1315,6 +1317,12 @@ static int mtk_poll_rx(struct napi_struc skb->protocol = eth_type_trans(skb, netdev); bytes += pktlen; + hash = trxd.rxd4 & GENMASK(13, 0); -+ if (hash != GENMASK(13, 0)) ++ if (hash != GENMASK(13, 0)) { ++ hash = jhash_1word(hash, 0); + skb_set_hash(skb, hash, PKT_HASH_TYPE_L4); ++ } + if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX && (trxd.rxd2 & RX_DMA_VTAG)) diff --git a/target/linux/generic/pending-5.4/770-15-net-ethernet-mediatek-mtk_eth_soc-add-support-for-in.patch b/target/linux/generic/pending-5.4/770-15-net-ethernet-mediatek-mtk_eth_soc-add-support-for-in.patch index 6d729c0f08..d679e30bea 100644 --- a/target/linux/generic/pending-5.4/770-15-net-ethernet-mediatek-mtk_eth_soc-add-support-for-in.patch +++ b/target/linux/generic/pending-5.4/770-15-net-ethernet-mediatek-mtk_eth_soc-add-support-for-in.patch @@ -24,7 +24,7 @@ Signed-off-by: Felix Fietkau +mtk_eth-y := mtk_eth_soc.o mtk_sgmii.o mtk_eth_path.o mtk_ppe.o --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -2277,12 +2277,17 @@ static int mtk_open(struct net_device *d +@@ -2280,12 +2280,17 @@ static int mtk_open(struct net_device *d /* we run 2 netdevs on the same dma ring so we only bring it up once */ if (!refcount_read(ð->dma_refcnt)) { @@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau napi_enable(ð->tx_napi); napi_enable(ð->rx_napi); -@@ -2352,6 +2357,9 @@ static int mtk_stop(struct net_device *d +@@ -2355,6 +2360,9 @@ static int mtk_stop(struct net_device *d mtk_dma_free(eth); @@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau return 0; } -@@ -3141,6 +3149,13 @@ static int mtk_probe(struct platform_dev +@@ -3144,6 +3152,13 @@ static int mtk_probe(struct platform_dev goto err_free_dev; } @@ -68,7 +68,7 @@ Signed-off-by: Felix Fietkau for (i = 0; i < MTK_MAX_DEVS; i++) { if (!eth->netdev[i]) continue; -@@ -3215,6 +3230,7 @@ static const struct mtk_soc_data mt7621_ +@@ -3218,6 +3233,7 @@ static const struct mtk_soc_data mt7621_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7621_CLKS_BITMAP, .required_pctl = false, @@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau }; static const struct mtk_soc_data mt7622_data = { -@@ -3223,6 +3239,7 @@ static const struct mtk_soc_data mt7622_ +@@ -3226,6 +3242,7 @@ static const struct mtk_soc_data mt7622_ .hw_features = MTK_HW_FEATURES, .required_clks = MT7622_CLKS_BITMAP, .required_pctl = false, diff --git a/target/linux/generic/pending-5.4/770-16-net-ethernet-mediatek-mtk_eth_soc-add-flow-offloadin.patch b/target/linux/generic/pending-5.4/770-16-net-ethernet-mediatek-mtk_eth_soc-add-flow-offloadin.patch index 810eeda75c..f63ed28998 100644 --- a/target/linux/generic/pending-5.4/770-16-net-ethernet-mediatek-mtk_eth_soc-add-flow-offloadin.patch +++ b/target/linux/generic/pending-5.4/770-16-net-ethernet-mediatek-mtk_eth_soc-add-flow-offloadin.patch @@ -20,16 +20,16 @@ Signed-off-by: Felix Fietkau +mtk_eth-y := mtk_eth_soc.o mtk_sgmii.o mtk_eth_path.o mtk_ppe.o mtk_ppe_debugfs.o mtk_offload.o --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -19,6 +19,8 @@ - #include +@@ -20,6 +20,8 @@ #include #include + #include +#include +#include #include #include "mtk_eth_soc.h" -@@ -1324,8 +1326,12 @@ static int mtk_poll_rx(struct napi_struc +@@ -1327,8 +1329,12 @@ static int mtk_poll_rx(struct napi_struc (trxd.rxd2 & RX_DMA_VTAG)) __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), RX_DMA_VID(trxd.rxd3)); @@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau skip_rx: ring->data[idx] = new_data; -@@ -2858,6 +2864,25 @@ static int mtk_set_rxnfc(struct net_devi +@@ -2861,6 +2867,25 @@ static int mtk_set_rxnfc(struct net_devi return ret; } @@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau static const struct ethtool_ops mtk_ethtool_ops = { .get_link_ksettings = mtk_get_link_ksettings, .set_link_ksettings = mtk_set_link_ksettings, -@@ -2889,6 +2914,7 @@ static const struct net_device_ops mtk_n +@@ -2892,6 +2917,7 @@ static const struct net_device_ops mtk_n #ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = mtk_poll_controller, #endif @@ -78,7 +78,7 @@ Signed-off-by: Felix Fietkau }; static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) -@@ -3154,6 +3180,10 @@ static int mtk_probe(struct platform_dev +@@ -3157,6 +3183,10 @@ static int mtk_probe(struct platform_dev eth->base + MTK_ETH_PPE_BASE, 2); if (err) goto err_free_dev; diff --git a/target/linux/lantiq/falcon/target.mk b/target/linux/lantiq/falcon/target.mk index 90f81d25ca..c07c8c2d82 100644 --- a/target/linux/lantiq/falcon/target.mk +++ b/target/linux/lantiq/falcon/target.mk @@ -1,7 +1,7 @@ ARCH:=mips SUBTARGET:=falcon BOARDNAME:=Falcon -FEATURES+=nand +FEATURES+=nand source-only CPU_TYPE:=24kc DEFAULT_PACKAGES+= kmod-leds-gpio \ diff --git a/target/linux/mediatek/patches-5.4/1011-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch b/target/linux/mediatek/patches-5.4/1011-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch index 18ddd0863e..efb30f2e50 100644 --- a/target/linux/mediatek/patches-5.4/1011-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch +++ b/target/linux/mediatek/patches-5.4/1011-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch @@ -37,7 +37,7 @@ Signed-off-by: Felix Fietkau #include #include #include -@@ -2482,6 +2483,13 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -2485,6 +2486,13 @@ static int mtk_hw_init(struct mtk_eth *e if (ret) goto err_disable_pm; @@ -51,7 +51,7 @@ Signed-off-by: Felix Fietkau if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) { ret = device_reset(eth->dev); if (ret) { -@@ -3080,6 +3088,16 @@ static int mtk_probe(struct platform_dev +@@ -3083,6 +3091,16 @@ static int mtk_probe(struct platform_dev } } diff --git a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts index 807e18d62b..b8fe2f8cdb 100644 --- a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts +++ b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts @@ -63,10 +63,6 @@ }; }; -&gpio1 { - status = "okay"; -}; - &gpio2 { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts index 00153fab64..545e11a83f 100644 --- a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts +++ b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts @@ -62,10 +62,6 @@ }; }; -&gpio1 { - status = "okay"; -}; - &gpio2 { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts index 43dfa0d5f5..575566c5fa 100644 --- a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts +++ b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts @@ -57,10 +57,6 @@ }; }; -&gpio1 { - status = "okay"; -}; - &gpio2 { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts b/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts index e3189a2f9b..75823787bf 100644 --- a/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts +++ b/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts @@ -57,10 +57,6 @@ }; }; -&gpio1 { - status = "okay"; -}; - &gpio2 { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi index 06f4054c50..6349ec5365 100644 --- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi +++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi @@ -38,10 +38,6 @@ ralink,wdtmux = <1>; }; -&gpio2 { - status = "okay"; -}; - &gpio3 { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts b/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts index b1602a98a1..4307d51424 100644 --- a/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts +++ b/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts @@ -28,14 +28,6 @@ }; }; -&gpio2 { - status = "okay"; -}; - -&gpio3 { - status = "okay"; -}; - &spi0 { status = "okay"; diff --git a/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts b/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts index 908f89d149..07f606fce4 100644 --- a/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts +++ b/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts @@ -43,10 +43,6 @@ }; }; -&gpio2 { - status = "okay"; -}; - &gpio3 { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts b/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts index e6374434ed..aa7ddb0a25 100644 --- a/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts +++ b/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts @@ -44,14 +44,6 @@ status = "okay"; }; -&gpio2 { - status = "okay"; -}; - -&gpio3 { - status = "okay"; -}; - &i2c { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7620a_sercomm_na930.dts b/target/linux/ramips/dts/mt7620a_sercomm_na930.dts index 0d96fd2901..4a91c07ecd 100644 --- a/target/linux/ramips/dts/mt7620a_sercomm_na930.dts +++ b/target/linux/ramips/dts/mt7620a_sercomm_na930.dts @@ -128,10 +128,6 @@ status = "okay"; }; -&gpio1 { - status = "okay"; -}; - &gpio2 { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts index 7d118e32b9..11b1aa38d6 100644 --- a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts +++ b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts @@ -54,10 +54,6 @@ status = "okay"; }; -&gpio2 { - status = "okay"; -}; - &spi0 { status = "okay"; diff --git a/target/linux/ramips/dts/mt7620a_yukai_bocco.dts b/target/linux/ramips/dts/mt7620a_yukai_bocco.dts index 6ad52d21ba..9c99a6582e 100644 --- a/target/linux/ramips/dts/mt7620a_yukai_bocco.dts +++ b/target/linux/ramips/dts/mt7620a_yukai_bocco.dts @@ -58,14 +58,6 @@ status = "okay"; }; -&gpio2 { - status = "okay"; -}; - -&gpio3 { - status = "okay"; -}; - &i2c { status = "okay"; diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts index aa26f4ea98..28ae7c3f98 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts +++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts @@ -51,14 +51,6 @@ }; }; -&gpio1 { - status = "okay"; -}; - -&gpio2 { - status = "okay"; -}; - &gpio3 { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts b/target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts index 2467a766a3..d659262b0e 100644 --- a/target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts +++ b/target/linux/ramips/dts/mt7620n_dlink_dwr-116-a1.dts @@ -45,10 +45,6 @@ }; }; -&gpio1 { - status = "okay"; -}; - &gpio3 { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts b/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts index 6c6e98fdd4..19d2f63694 100644 --- a/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts +++ b/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts @@ -50,10 +50,6 @@ }; }; -&gpio1 { - status = "okay"; -}; - &gpio2 { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi b/target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi index 0a724c048b..1597c088bc 100644 --- a/target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi +++ b/target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi @@ -34,10 +34,6 @@ }; }; -&gpio2 { - status = "okay"; -}; - &gpio3 { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts b/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts index 3ac7296f75..144591d48a 100644 --- a/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts +++ b/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts @@ -27,14 +27,6 @@ status = "okay"; }; -&gpio2 { - status = "okay"; -}; - -&gpio3 { - status = "okay"; -}; - &spi0 { status = "okay"; diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts index 35bada9a24..6d018b9e58 100644 --- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts +++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts @@ -50,14 +50,6 @@ status = "okay"; }; -&gpio2 { - status = "okay"; -}; - -&gpio3 { - status = "okay"; -}; - &spi0 { status = "okay"; diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts index a6ef51dabb..b29c034140 100644 --- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts +++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts @@ -54,10 +54,6 @@ status = "okay"; }; -&gpio2 { - status = "okay"; -}; - &gpio3 { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts new file mode 100644 index 0000000000..49eeb46d5f --- /dev/null +++ b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts @@ -0,0 +1,151 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "glinet,gl-mt1300", "mediatek,mt7621-soc"; + model = "GL.iNet GL-MT1300"; + + aliases { + led-boot = &led_run; + led-failsafe = &led_run; + led-running = &led_run; + led-upgrade = &led_run; + label-mac-device = &wan; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + switch { + label = "switch"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + linux,code = ; + linux,input-type = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_run: run { + label = "blue:run"; + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; + }; + + system { + label = "white:system"; + gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&i2c { + status = "okay"; +}; + +&sdhci { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "mx25l25635f", "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <80000000>; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x1fb0000>; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0>; + }; +}; + +&gmac0 { + mtd-mac-address = <&factory 0x4000>; + mtd-mac-address-increment = <1>; +}; + +&switch0 { + ports { + port@2 { + status = "okay"; + label = "lan1"; + }; + + port@3 { + status = "okay"; + label = "lan2"; + }; + + wan: port@4 { + status = "okay"; + label = "wan"; + mtd-mac-address = <&factory 0x4000>; + }; + }; +}; + +&uartlite3 { + status = "okay"; +}; + +&state_default { + gpio { + group = "wdt", "jtag"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts b/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts index c0e3193818..a1e7c837d1 100644 --- a/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts +++ b/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts @@ -130,10 +130,6 @@ status = "okay"; }; -&gpio1 { - status = "okay"; -}; - &uartlite { status = "okay"; }; diff --git a/target/linux/ramips/dts/rt3883_belkin_f9k110x.dtsi b/target/linux/ramips/dts/rt3883_belkin_f9k110x.dtsi index 848c6eed01..0b2c7602d1 100644 --- a/target/linux/ramips/dts/rt3883_belkin_f9k110x.dtsi +++ b/target/linux/ramips/dts/rt3883_belkin_f9k110x.dtsi @@ -16,10 +16,6 @@ }; }; -&gpio1 { - status = "okay"; -}; - &spi0 { status = "okay"; diff --git a/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts b/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts index 43769eeb62..3b1fdd4a8e 100644 --- a/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts +++ b/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts @@ -5,10 +5,6 @@ model = "EASYACC WI-STOR WIZARD 8800"; }; -&gpio1 { - status = "okay"; -}; - &spi0 { status = "okay"; diff --git a/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts b/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts index 5054a8c211..1386ec920b 100644 --- a/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts +++ b/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts @@ -97,10 +97,6 @@ }; }; -&gpio1 { - status = "okay"; -}; - &state_default { gpio { groups = "i2c", "jtag", "uartf", "led"; diff --git a/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi b/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi index 902cc6e522..7d85109bec 100644 --- a/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi +++ b/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi @@ -49,10 +49,6 @@ }; }; -&gpio1 { - status = "okay"; -}; - &state_default { gpio { groups = "jtag"; diff --git a/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts b/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts index c7e899580c..d3d1ebe26f 100644 --- a/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts +++ b/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts @@ -35,10 +35,6 @@ }; }; -&gpio1 { - status = "okay"; -}; - &spi0 { status = "okay"; diff --git a/target/linux/ramips/dts/rt5350_tenda_3g150b.dts b/target/linux/ramips/dts/rt5350_tenda_3g150b.dts index a20cd04a26..35ccee1584 100644 --- a/target/linux/ramips/dts/rt5350_tenda_3g150b.dts +++ b/target/linux/ramips/dts/rt5350_tenda_3g150b.dts @@ -93,10 +93,6 @@ }; }; -&gpio1 { - status = "okay"; -}; - &state_default { gpio { groups = "i2c", "jtag", "uartf", "led"; diff --git a/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts b/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts index 2173ec4fba..089b85629b 100644 --- a/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts +++ b/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts @@ -98,10 +98,6 @@ }; }; -&gpio1 { - status = "okay"; -}; - &state_default { gpio { groups = "i2c", "jtag", "uartf", "led"; diff --git a/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts b/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts index 314c4091a4..2cb6101184 100644 --- a/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts +++ b/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts @@ -72,10 +72,6 @@ }; }; -&gpio1 { - status = "okay"; -}; - &spi0 { status = "okay"; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index fe83e69caa..96a63d8916 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -475,6 +475,15 @@ define Device/gehua_ghl-r-001 endef TARGET_DEVICES += gehua_ghl-r-001 +define Device/glinet_gl-mt1300 + $(Device/dsa-migration) + IMAGE_SIZE := 32448k + DEVICE_VENDOR := GL.iNet + DEVICE_MODEL := GL-MT1300 + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 +endef +TARGET_DEVICES += glinet_gl-mt1300 + define Device/gnubee_gb-pc1 $(Device/dsa-migration) DEVICE_VENDOR := GnuBee diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index c5b35145f1..bca4cc23dc 100755 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -14,6 +14,7 @@ ramips_setup_interfaces() ucidef_set_interfaces_lan_wan "lan" "wan" ;; asiarf,ap7621-nv1|\ + glinet,gl-mt1300|\ lenovo,newifi-d1|\ mikrotik,routerboard-m33g|\ xiaomi,mi-router-3g|\ diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index b7a41f038c..e7f778aaf8 100644 --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -10,6 +10,10 @@ PHYNBR=${DEVPATH##*/phy} board=$(board_name) case "$board" in + glinet,gl-mt1300) + [ "$PHYNBR" = "1" ] && \ + macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1 > /sys${DEVPATH}/macaddress + ;; linksys,ea7300-v1|\ linksys,ea7300-v2|\ linksys,ea7500-v2) diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in index 1aadae6839..f0fc31d567 100644 --- a/toolchain/gcc/Config.in +++ b/toolchain/gcc/Config.in @@ -6,10 +6,6 @@ choice help Select the version of gcc you wish to use. - config GCC_USE_VERSION_5 - bool "gcc 5.x" - depends on !arc - config GCC_USE_VERSION_7 bool "gcc 7.x" depends on !arc @@ -38,7 +34,6 @@ config EXTRA_GCC_CONFIG_OPTIONS config GCC_DEFAULT_PIE bool prompt "Build executable with PIE enabled by default" if TOOLCHAINOPTS - depends on !GCC_USE_VERSION_5 default n help Use gcc configure option --enable-default-pie to turn on -fPIE and -pie by default. diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version index 09deae3bf1..967ce9e489 100644 --- a/toolchain/gcc/Config.version +++ b/toolchain/gcc/Config.version @@ -1,7 +1,3 @@ -config GCC_VERSION_5 - default y if GCC_USE_VERSION_5 - bool - config GCC_VERSION_7 default y if GCC_USE_VERSION_7 bool @@ -16,7 +12,6 @@ config GCC_VERSION_10 config GCC_VERSION string - default "5.5.0" if GCC_VERSION_5 default "7.5.0" if GCC_VERSION_7 default "9.3.0" if GCC_VERSION_9 default "10.2.0" if GCC_VERSION_10 @@ -24,5 +19,5 @@ config GCC_VERSION config GCC_USE_IREMAP bool - default y if ( GCC_USE_VERSION_5 || GCC_USE_VERSION_7 ) + default y if GCC_USE_VERSION_7 default n diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index ab312e5afd..aaddb74642 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -28,10 +28,6 @@ GCC_DIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -ifeq ($(PKG_VERSION),5.5.0) - PKG_HASH:=530cea139d82fe542b358961130c69cfde8b3d14556370b65823d2f91f0ced87 -endif - ifeq ($(PKG_VERSION),7.5.0) PKG_HASH:=b81946e7f01f90528a1f7352ab08cc602b9ccc05d4e44da4bd501c5a189ee661 endif diff --git a/toolchain/gcc/patches/5.5.0/001-revert_register_mode_search.patch b/toolchain/gcc/patches/5.5.0/001-revert_register_mode_search.patch deleted file mode 100644 index 06373eb6a0..0000000000 --- a/toolchain/gcc/patches/5.5.0/001-revert_register_mode_search.patch +++ /dev/null @@ -1,65 +0,0 @@ -Revert of: - -commit 275035b56823b26d5fb7e90fad945b998648edf2 -Author: bergner -Date: Thu Sep 5 14:09:07 2013 +0000 - - PR target/58139 - * reginfo.c (choose_hard_reg_mode): Scan through all mode classes - looking for widest mode. - - - git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4 - - ---- a/gcc/reginfo.c -+++ b/gcc/reginfo.c -@@ -665,35 +665,40 @@ choose_hard_reg_mode (unsigned int regno - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - -+ if (found_mode != VOIDmode) -+ return found_mode; -+ - for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT); - mode != VOIDmode; - mode = GET_MODE_WIDER_MODE (mode)) - if ((unsigned) hard_regno_nregs[regno][mode] == nregs - && HARD_REGNO_MODE_OK (regno, mode) -- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) -- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) -+ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) - found_mode = mode; - - if (found_mode != VOIDmode) diff --git a/toolchain/gcc/patches/5.5.0/002-case_insensitive.patch b/toolchain/gcc/patches/5.5.0/002-case_insensitive.patch deleted file mode 100644 index b3d2dbe291..0000000000 --- a/toolchain/gcc/patches/5.5.0/002-case_insensitive.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -43,11 +43,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/toolchain/gcc/patches/5.5.0/010-documentation.patch b/toolchain/gcc/patches/5.5.0/010-documentation.patch deleted file mode 100644 index d7166b24e7..0000000000 --- a/toolchain/gcc/patches/5.5.0/010-documentation.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -2943,18 +2943,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/toolchain/gcc/patches/5.5.0/020-no-plt-backport.patch b/toolchain/gcc/patches/5.5.0/020-no-plt-backport.patch deleted file mode 100644 index b9702c9520..0000000000 --- a/toolchain/gcc/patches/5.5.0/020-no-plt-backport.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/gcc/calls.c -+++ b/gcc/calls.c -@@ -225,6 +225,12 @@ prepare_call_address (tree fndecl_or_typ - && targetm.small_register_classes_for_mode_p (FUNCTION_MODE)) - ? force_not_mem (memory_address (FUNCTION_MODE, funexp)) - : memory_address (FUNCTION_MODE, funexp)); -+ else if (flag_pic && !flag_plt && fndecl_or_type -+ && TREE_CODE (fndecl_or_type) == FUNCTION_DECL -+ && !targetm.binds_local_p (fndecl_or_type)) -+ { -+ funexp = force_reg (Pmode, funexp); -+ } - else if (! sibcallp) - { - #ifndef NO_FUNCTION_CSE ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -1779,6 +1779,10 @@ fpie - Common Report Var(flag_pie,1) Negative(fPIC) - Generate position-independent code for executables if possible (small mode) - -+fplt -+Common Report Var(flag_plt) Init(1) -+Use PLT for PIC calls (-fno-plt: load the address from GOT at call site) -+ - fplugin= - Common Joined RejectNegative Var(common_deferred_options) Defer - Specify a plugin to load diff --git a/toolchain/gcc/patches/5.5.0/040-fix-mips-ICE-PR-68400.patch b/toolchain/gcc/patches/5.5.0/040-fix-mips-ICE-PR-68400.patch deleted file mode 100644 index e88af34032..0000000000 --- a/toolchain/gcc/patches/5.5.0/040-fix-mips-ICE-PR-68400.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -8001,9 +8001,17 @@ mask_low_and_shift_p (machine_mode mode, - bool - and_operands_ok (machine_mode mode, rtx op1, rtx op2) - { -- return (memory_operand (op1, mode) -- ? and_load_operand (op2, mode) -- : and_reg_operand (op2, mode)); -+ if (!memory_operand (op1, mode)) -+ return and_reg_operand (op2, mode); -+ -+ if (!and_load_operand (op2, mode)) -+ return false; -+ -+ if (!TARGET_MIPS16 || si_mask_operand(op2, mode)) -+ return true; -+ -+ op1 = XEXP (op1, 0); -+ return !(REG_P (op1) && REGNO (op1) == STACK_POINTER_REGNUM); - } - - /* The canonical form of a mask-low-and-shift-left operation is diff --git a/toolchain/gcc/patches/5.5.0/050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch b/toolchain/gcc/patches/5.5.0/050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch deleted file mode 100644 index 5ec93f5247..0000000000 --- a/toolchain/gcc/patches/5.5.0/050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch +++ /dev/null @@ -1,1092 +0,0 @@ -From 55f12fce4ccf77513644a247f9c401a5b1fa2402 Mon Sep 17 00:00:00 2001 -From: torvald -Date: Thu, 20 Aug 2015 17:55:24 +0000 -Subject: [PATCH] libitm: Don't redefine __always_inline in local_atomic. - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227040 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - libitm/ChangeLog | 6 + - libitm/local_atomic | 299 ++++++++++++++++++++++---------------------- - 2 files changed, 155 insertions(+), 150 deletions(-) - -diff --git a/libitm/ChangeLog b/libitm/ChangeLog -index 569d5bbbf14..6285c85fd44 100644 ---- a/libitm/ChangeLog -+++ b/libitm/ChangeLog -@@ -1,3 +1,9 @@ -+2015-08-20 Gleb Fotengauer-Malinovskiy (tiny change) -+ -+ PR libitm/61164 -+ * local_atomic (__always_inline): Rename to... -+ (__libitm_always_inline): ... this. -+ - 2017-10-10 Release Manager - - PR target/52482 -diff --git a/libitm/local_atomic b/libitm/local_atomic -index 3119be40d09..e536275dc9f 100644 ---- a/libitm/local_atomic -+++ b/libitm/local_atomic -@@ -41,8 +41,7 @@ - #ifndef _GLIBCXX_ATOMIC - #define _GLIBCXX_ATOMIC 1 - --#undef __always_inline --#define __always_inline __attribute__((always_inline)) -+#define __libitm_always_inline __attribute__((always_inline)) - - // #pragma GCC system_header - -@@ -74,7 +73,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - memory_order_seq_cst - } memory_order; - -- inline __always_inline memory_order -+ inline __libitm_always_inline memory_order - __calculate_memory_order(memory_order __m) noexcept - { - const bool __cond1 = __m == memory_order_release; -@@ -84,13 +83,13 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __mo2; - } - -- inline __always_inline void -+ inline __libitm_always_inline void - atomic_thread_fence(memory_order __m) noexcept - { - __atomic_thread_fence (__m); - } - -- inline __always_inline void -+ inline __libitm_always_inline void - atomic_signal_fence(memory_order __m) noexcept - { - __atomic_thread_fence (__m); -@@ -280,19 +279,19 @@ namespace std // _GLIBCXX_VISIBILITY(default) - // Conversion to ATOMIC_FLAG_INIT. - atomic_flag(bool __i) noexcept : __atomic_flag_base({ __i }) { } - -- __always_inline bool -+ __libitm_always_inline bool - test_and_set(memory_order __m = memory_order_seq_cst) noexcept - { - return __atomic_test_and_set (&_M_i, __m); - } - -- __always_inline bool -+ __libitm_always_inline bool - test_and_set(memory_order __m = memory_order_seq_cst) volatile noexcept - { - return __atomic_test_and_set (&_M_i, __m); - } - -- __always_inline void -+ __libitm_always_inline void - clear(memory_order __m = memory_order_seq_cst) noexcept - { - // __glibcxx_assert(__m != memory_order_consume); -@@ -302,7 +301,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __atomic_clear (&_M_i, __m); - } - -- __always_inline void -+ __libitm_always_inline void - clear(memory_order __m = memory_order_seq_cst) volatile noexcept - { - // __glibcxx_assert(__m != memory_order_consume); -@@ -455,7 +454,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - is_lock_free() const volatile noexcept - { return __atomic_is_lock_free (sizeof (_M_i), &_M_i); } - -- __always_inline void -+ __libitm_always_inline void - store(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept - { - // __glibcxx_assert(__m != memory_order_acquire); -@@ -465,7 +464,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __atomic_store_n(&_M_i, __i, __m); - } - -- __always_inline void -+ __libitm_always_inline void - store(__int_type __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { -@@ -476,7 +475,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __atomic_store_n(&_M_i, __i, __m); - } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - load(memory_order __m = memory_order_seq_cst) const noexcept - { - // __glibcxx_assert(__m != memory_order_release); -@@ -485,7 +484,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_load_n(&_M_i, __m); - } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - load(memory_order __m = memory_order_seq_cst) const volatile noexcept - { - // __glibcxx_assert(__m != memory_order_release); -@@ -494,21 +493,21 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_load_n(&_M_i, __m); - } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - exchange(__int_type __i, - memory_order __m = memory_order_seq_cst) noexcept - { - return __atomic_exchange_n(&_M_i, __i, __m); - } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - exchange(__int_type __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { - return __atomic_exchange_n(&_M_i, __i, __m); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(__int_type& __i1, __int_type __i2, - memory_order __m1, memory_order __m2) noexcept - { -@@ -519,7 +518,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, __m1, __m2); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(__int_type& __i1, __int_type __i2, - memory_order __m1, - memory_order __m2) volatile noexcept -@@ -531,7 +530,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, __m1, __m2); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(__int_type& __i1, __int_type __i2, - memory_order __m = memory_order_seq_cst) noexcept - { -@@ -539,7 +538,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __calculate_memory_order(__m)); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(__int_type& __i1, __int_type __i2, - memory_order __m = memory_order_seq_cst) volatile noexcept - { -@@ -547,7 +546,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __calculate_memory_order(__m)); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__int_type& __i1, __int_type __i2, - memory_order __m1, memory_order __m2) noexcept - { -@@ -558,7 +557,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__int_type& __i1, __int_type __i2, - memory_order __m1, - memory_order __m2) volatile noexcept -@@ -570,7 +569,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__int_type& __i1, __int_type __i2, - memory_order __m = memory_order_seq_cst) noexcept - { -@@ -578,7 +577,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __calculate_memory_order(__m)); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__int_type& __i1, __int_type __i2, - memory_order __m = memory_order_seq_cst) volatile noexcept - { -@@ -586,52 +585,52 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __calculate_memory_order(__m)); - } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_add(__int_type __i, - memory_order __m = memory_order_seq_cst) noexcept - { return __atomic_fetch_add(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_add(__int_type __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return __atomic_fetch_add(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_sub(__int_type __i, - memory_order __m = memory_order_seq_cst) noexcept - { return __atomic_fetch_sub(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_sub(__int_type __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return __atomic_fetch_sub(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_and(__int_type __i, - memory_order __m = memory_order_seq_cst) noexcept - { return __atomic_fetch_and(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_and(__int_type __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return __atomic_fetch_and(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_or(__int_type __i, - memory_order __m = memory_order_seq_cst) noexcept - { return __atomic_fetch_or(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_or(__int_type __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return __atomic_fetch_or(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_xor(__int_type __i, - memory_order __m = memory_order_seq_cst) noexcept - { return __atomic_fetch_xor(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_xor(__int_type __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return __atomic_fetch_xor(&_M_i, __i, __m); } -@@ -733,7 +732,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - is_lock_free() const volatile noexcept - { return __atomic_is_lock_free (sizeof (_M_p), &_M_p); } - -- __always_inline void -+ __libitm_always_inline void - store(__pointer_type __p, - memory_order __m = memory_order_seq_cst) noexcept - { -@@ -744,7 +743,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __atomic_store_n(&_M_p, __p, __m); - } - -- __always_inline void -+ __libitm_always_inline void - store(__pointer_type __p, - memory_order __m = memory_order_seq_cst) volatile noexcept - { -@@ -755,7 +754,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __atomic_store_n(&_M_p, __p, __m); - } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - load(memory_order __m = memory_order_seq_cst) const noexcept - { - // __glibcxx_assert(__m != memory_order_release); -@@ -764,7 +763,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_load_n(&_M_p, __m); - } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - load(memory_order __m = memory_order_seq_cst) const volatile noexcept - { - // __glibcxx_assert(__m != memory_order_release); -@@ -773,21 +772,21 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_load_n(&_M_p, __m); - } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - exchange(__pointer_type __p, - memory_order __m = memory_order_seq_cst) noexcept - { - return __atomic_exchange_n(&_M_p, __p, __m); - } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - exchange(__pointer_type __p, - memory_order __m = memory_order_seq_cst) volatile noexcept - { - return __atomic_exchange_n(&_M_p, __p, __m); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, - memory_order __m1, - memory_order __m2) noexcept -@@ -799,7 +798,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, __m1, __m2); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, - memory_order __m1, - memory_order __m2) volatile noexcept -@@ -811,22 +810,22 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, __m1, __m2); - } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - fetch_add(ptrdiff_t __d, - memory_order __m = memory_order_seq_cst) noexcept - { return __atomic_fetch_add(&_M_p, __d, __m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - fetch_add(ptrdiff_t __d, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return __atomic_fetch_add(&_M_p, __d, __m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - fetch_sub(ptrdiff_t __d, - memory_order __m = memory_order_seq_cst) noexcept - { return __atomic_fetch_sub(&_M_p, __d, __m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - fetch_sub(ptrdiff_t __d, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return __atomic_fetch_sub(&_M_p, __d, __m); } -@@ -870,67 +869,67 @@ namespace std // _GLIBCXX_VISIBILITY(default) - bool - is_lock_free() const volatile noexcept { return _M_base.is_lock_free(); } - -- __always_inline void -+ __libitm_always_inline void - store(bool __i, memory_order __m = memory_order_seq_cst) noexcept - { _M_base.store(__i, __m); } - -- __always_inline void -+ __libitm_always_inline void - store(bool __i, memory_order __m = memory_order_seq_cst) volatile noexcept - { _M_base.store(__i, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - load(memory_order __m = memory_order_seq_cst) const noexcept - { return _M_base.load(__m); } - -- __always_inline bool -+ __libitm_always_inline bool - load(memory_order __m = memory_order_seq_cst) const volatile noexcept - { return _M_base.load(__m); } - -- __always_inline bool -+ __libitm_always_inline bool - exchange(bool __i, memory_order __m = memory_order_seq_cst) noexcept - { return _M_base.exchange(__i, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - exchange(bool __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return _M_base.exchange(__i, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1, - memory_order __m2) noexcept - { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1, - memory_order __m2) volatile noexcept - { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(bool& __i1, bool __i2, - memory_order __m = memory_order_seq_cst) noexcept - { return _M_base.compare_exchange_weak(__i1, __i2, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(bool& __i1, bool __i2, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return _M_base.compare_exchange_weak(__i1, __i2, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1, - memory_order __m2) noexcept - { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1, - memory_order __m2) volatile noexcept - { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(bool& __i1, bool __i2, - memory_order __m = memory_order_seq_cst) noexcept - { return _M_base.compare_exchange_strong(__i1, __i2, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(bool& __i1, bool __i2, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return _M_base.compare_exchange_strong(__i1, __i2, __m); } -@@ -980,11 +979,11 @@ namespace std // _GLIBCXX_VISIBILITY(default) - store(_Tp __i, memory_order _m = memory_order_seq_cst) noexcept - { __atomic_store(&_M_i, &__i, _m); } - -- __always_inline void -+ __libitm_always_inline void - store(_Tp __i, memory_order _m = memory_order_seq_cst) volatile noexcept - { __atomic_store(&_M_i, &__i, _m); } - -- __always_inline _Tp -+ __libitm_always_inline _Tp - load(memory_order _m = memory_order_seq_cst) const noexcept - { - _Tp tmp; -@@ -992,7 +991,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return tmp; - } - -- __always_inline _Tp -+ __libitm_always_inline _Tp - load(memory_order _m = memory_order_seq_cst) const volatile noexcept - { - _Tp tmp; -@@ -1000,7 +999,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return tmp; - } - -- __always_inline _Tp -+ __libitm_always_inline _Tp - exchange(_Tp __i, memory_order _m = memory_order_seq_cst) noexcept - { - _Tp tmp; -@@ -1008,7 +1007,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return tmp; - } - -- __always_inline _Tp -+ __libitm_always_inline _Tp - exchange(_Tp __i, - memory_order _m = memory_order_seq_cst) volatile noexcept - { -@@ -1017,50 +1016,50 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return tmp; - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, - memory_order __f) noexcept - { - return __atomic_compare_exchange(&_M_i, &__e, &__i, true, __s, __f); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, - memory_order __f) volatile noexcept - { - return __atomic_compare_exchange(&_M_i, &__e, &__i, true, __s, __f); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(_Tp& __e, _Tp __i, - memory_order __m = memory_order_seq_cst) noexcept - { return compare_exchange_weak(__e, __i, __m, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(_Tp& __e, _Tp __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return compare_exchange_weak(__e, __i, __m, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, - memory_order __f) noexcept - { - return __atomic_compare_exchange(&_M_i, &__e, &__i, false, __s, __f); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, - memory_order __f) volatile noexcept - { - return __atomic_compare_exchange(&_M_i, &__e, &__i, false, __s, __f); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(_Tp& __e, _Tp __i, - memory_order __m = memory_order_seq_cst) noexcept - { return compare_exchange_strong(__e, __i, __m, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(_Tp& __e, _Tp __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return compare_exchange_strong(__e, __i, __m, __m); } -@@ -1153,46 +1152,46 @@ namespace std // _GLIBCXX_VISIBILITY(default) - is_lock_free() const volatile noexcept - { return _M_b.is_lock_free(); } - -- __always_inline void -+ __libitm_always_inline void - store(__pointer_type __p, - memory_order __m = memory_order_seq_cst) noexcept - { return _M_b.store(__p, __m); } - -- __always_inline void -+ __libitm_always_inline void - store(__pointer_type __p, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return _M_b.store(__p, __m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - load(memory_order __m = memory_order_seq_cst) const noexcept - { return _M_b.load(__m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - load(memory_order __m = memory_order_seq_cst) const volatile noexcept - { return _M_b.load(__m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - exchange(__pointer_type __p, - memory_order __m = memory_order_seq_cst) noexcept - { return _M_b.exchange(__p, __m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - exchange(__pointer_type __p, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return _M_b.exchange(__p, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, - memory_order __m1, memory_order __m2) noexcept - { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, - memory_order __m1, - memory_order __m2) volatile noexcept - { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, - memory_order __m = memory_order_seq_cst) noexcept - { -@@ -1200,7 +1199,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __calculate_memory_order(__m)); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, - memory_order __m = memory_order_seq_cst) volatile noexcept - { -@@ -1208,18 +1207,18 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __calculate_memory_order(__m)); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, - memory_order __m1, memory_order __m2) noexcept - { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, - memory_order __m1, - memory_order __m2) volatile noexcept - { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, - memory_order __m = memory_order_seq_cst) noexcept - { -@@ -1227,7 +1226,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __calculate_memory_order(__m)); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, - memory_order __m = memory_order_seq_cst) volatile noexcept - { -@@ -1235,22 +1234,22 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __calculate_memory_order(__m)); - } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - fetch_add(ptrdiff_t __d, - memory_order __m = memory_order_seq_cst) noexcept - { return _M_b.fetch_add(__d, __m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - fetch_add(ptrdiff_t __d, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return _M_b.fetch_add(__d, __m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - fetch_sub(ptrdiff_t __d, - memory_order __m = memory_order_seq_cst) noexcept - { return _M_b.fetch_sub(__d, __m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - fetch_sub(ptrdiff_t __d, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return _M_b.fetch_sub(__d, __m); } -@@ -1544,98 +1543,98 @@ namespace std // _GLIBCXX_VISIBILITY(default) - - - // Function definitions, atomic_flag operations. -- inline __always_inline bool -+ inline __libitm_always_inline bool - atomic_flag_test_and_set_explicit(atomic_flag* __a, - memory_order __m) noexcept - { return __a->test_and_set(__m); } - -- inline __always_inline bool -+ inline __libitm_always_inline bool - atomic_flag_test_and_set_explicit(volatile atomic_flag* __a, - memory_order __m) noexcept - { return __a->test_and_set(__m); } - -- inline __always_inline void -+ inline __libitm_always_inline void - atomic_flag_clear_explicit(atomic_flag* __a, memory_order __m) noexcept - { __a->clear(__m); } - -- inline __always_inline void -+ inline __libitm_always_inline void - atomic_flag_clear_explicit(volatile atomic_flag* __a, - memory_order __m) noexcept - { __a->clear(__m); } - -- inline __always_inline bool -+ inline __libitm_always_inline bool - atomic_flag_test_and_set(atomic_flag* __a) noexcept - { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } - -- inline __always_inline bool -+ inline __libitm_always_inline bool - atomic_flag_test_and_set(volatile atomic_flag* __a) noexcept - { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } - -- inline __always_inline void -+ inline __libitm_always_inline void - atomic_flag_clear(atomic_flag* __a) noexcept - { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } - -- inline __always_inline void -+ inline __libitm_always_inline void - atomic_flag_clear(volatile atomic_flag* __a) noexcept - { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } - - - // Function templates generally applicable to atomic types. - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_is_lock_free(const atomic<_ITp>* __a) noexcept - { return __a->is_lock_free(); } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_is_lock_free(const volatile atomic<_ITp>* __a) noexcept - { return __a->is_lock_free(); } - - template -- __always_inline void -+ __libitm_always_inline void - atomic_init(atomic<_ITp>* __a, _ITp __i) noexcept; - - template -- __always_inline void -+ __libitm_always_inline void - atomic_init(volatile atomic<_ITp>* __a, _ITp __i) noexcept; - - template -- __always_inline void -+ __libitm_always_inline void - atomic_store_explicit(atomic<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { __a->store(__i, __m); } - - template -- __always_inline void -+ __libitm_always_inline void - atomic_store_explicit(volatile atomic<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { __a->store(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_load_explicit(const atomic<_ITp>* __a, memory_order __m) noexcept - { return __a->load(__m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_load_explicit(const volatile atomic<_ITp>* __a, - memory_order __m) noexcept - { return __a->load(__m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_exchange_explicit(atomic<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->exchange(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_exchange_explicit(volatile atomic<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->exchange(__i, __m); } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_compare_exchange_weak_explicit(atomic<_ITp>* __a, - _ITp* __i1, _ITp __i2, - memory_order __m1, -@@ -1643,7 +1642,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_compare_exchange_weak_explicit(volatile atomic<_ITp>* __a, - _ITp* __i1, _ITp __i2, - memory_order __m1, -@@ -1651,7 +1650,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_compare_exchange_strong_explicit(atomic<_ITp>* __a, - _ITp* __i1, _ITp __i2, - memory_order __m1, -@@ -1659,7 +1658,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_compare_exchange_strong_explicit(volatile atomic<_ITp>* __a, - _ITp* __i1, _ITp __i2, - memory_order __m1, -@@ -1668,37 +1667,37 @@ namespace std // _GLIBCXX_VISIBILITY(default) - - - template -- __always_inline void -+ __libitm_always_inline void - atomic_store(atomic<_ITp>* __a, _ITp __i) noexcept - { atomic_store_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline void -+ __libitm_always_inline void - atomic_store(volatile atomic<_ITp>* __a, _ITp __i) noexcept - { atomic_store_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_load(const atomic<_ITp>* __a) noexcept - { return atomic_load_explicit(__a, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_load(const volatile atomic<_ITp>* __a) noexcept - { return atomic_load_explicit(__a, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_exchange(atomic<_ITp>* __a, _ITp __i) noexcept - { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_exchange(volatile atomic<_ITp>* __a, _ITp __i) noexcept - { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_compare_exchange_weak(atomic<_ITp>* __a, - _ITp* __i1, _ITp __i2) noexcept - { -@@ -1708,7 +1707,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_compare_exchange_weak(volatile atomic<_ITp>* __a, - _ITp* __i1, _ITp __i2) noexcept - { -@@ -1718,7 +1717,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_compare_exchange_strong(atomic<_ITp>* __a, - _ITp* __i1, _ITp __i2) noexcept - { -@@ -1728,7 +1727,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_compare_exchange_strong(volatile atomic<_ITp>* __a, - _ITp* __i1, _ITp __i2) noexcept - { -@@ -1742,158 +1741,158 @@ namespace std // _GLIBCXX_VISIBILITY(default) - // intergral types as specified in the standard, excluding address - // types. - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_add_explicit(__atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_add(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_add_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_add(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_sub_explicit(__atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_sub(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_sub_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_sub(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_and_explicit(__atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_and(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_and_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_and(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_or_explicit(__atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_or(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_or_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_or(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_xor_explicit(__atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_xor(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_xor_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_xor(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_add(__atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_add(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_sub(__atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_sub(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_and(__atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_and(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_or(__atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_or(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_xor(__atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_xor(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); } - - - // Partial specializations for pointers. - template -- __always_inline _ITp* -+ __libitm_always_inline _ITp* - atomic_fetch_add_explicit(atomic<_ITp*>* __a, ptrdiff_t __d, - memory_order __m) noexcept - { return __a->fetch_add(__d, __m); } - - template -- __always_inline _ITp* -+ __libitm_always_inline _ITp* - atomic_fetch_add_explicit(volatile atomic<_ITp*>* __a, ptrdiff_t __d, - memory_order __m) noexcept - { return __a->fetch_add(__d, __m); } - - template -- __always_inline _ITp* -+ __libitm_always_inline _ITp* - atomic_fetch_add(volatile atomic<_ITp*>* __a, ptrdiff_t __d) noexcept - { return __a->fetch_add(__d); } - - template -- __always_inline _ITp* -+ __libitm_always_inline _ITp* - atomic_fetch_add(atomic<_ITp*>* __a, ptrdiff_t __d) noexcept - { return __a->fetch_add(__d); } - - template -- __always_inline _ITp* -+ __libitm_always_inline _ITp* - atomic_fetch_sub_explicit(volatile atomic<_ITp*>* __a, - ptrdiff_t __d, memory_order __m) noexcept - { return __a->fetch_sub(__d, __m); } - - template -- __always_inline _ITp* -+ __libitm_always_inline _ITp* - atomic_fetch_sub_explicit(atomic<_ITp*>* __a, ptrdiff_t __d, - memory_order __m) noexcept - { return __a->fetch_sub(__d, __m); } - - template -- __always_inline _ITp* -+ __libitm_always_inline _ITp* - atomic_fetch_sub(volatile atomic<_ITp*>* __a, ptrdiff_t __d) noexcept - { return __a->fetch_sub(__d); } - - template -- __always_inline _ITp* -+ __libitm_always_inline _ITp* - atomic_fetch_sub(atomic<_ITp*>* __a, ptrdiff_t __d) noexcept - { return __a->fetch_sub(__d); } - // @} group atomics --- -2.19.2 - diff --git a/toolchain/gcc/patches/5.5.0/200-musl_config.patch b/toolchain/gcc/patches/5.5.0/200-musl_config.patch deleted file mode 100644 index 178c25ce34..0000000000 --- a/toolchain/gcc/patches/5.5.0/200-musl_config.patch +++ /dev/null @@ -1,309 +0,0 @@ -From: ktkachov -Date: Fri, 8 May 2015 08:25:47 +0000 (+0000) -Subject: [PATCH 2/13] musl libc config -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a9173ceabaf29c16f8ef226fbf98af373a4b2ceb - -[PATCH 2/13] musl libc config - -2015-05-08 Gregor Richards - Szabolcs Nagy - - * config.gcc (LIBC_MUSL): New tm_defines macro. - * config/linux.h (OPTION_MUSL): Define. - (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER32,) - (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32,) - (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,) - (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,) - (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define. - * config/linux.opt (mmusl): New option. - * doc/invoke.texi (GNU/Linux Options): Document -mmusl. - * configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*. - (gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*. - * configure: Regenerate. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222904 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -575,7 +575,7 @@ case ${target} in - esac - - # Common C libraries. --tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" -+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" - - # 32-bit x86 processors supported by --with-arch=. Each processor - # MUST be separated by exactly one space. -@@ -720,6 +720,9 @@ case ${target} in - *-*-*uclibc*) - tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" - ;; -+ *-*-*musl*) -+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" -+ ;; - *) - tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" - ;; ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -32,10 +32,12 @@ see the files COPYING3 and COPYING.RUNTI - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ -@@ -50,21 +52,25 @@ see the files COPYING3 and COPYING.RUNTI - } while (0) - - /* Determine which dynamic linker to use depending on whether GLIBC or -- uClibc or Bionic is the default C library and whether -- -muclibc or -mglibc or -mbionic has been passed to change the default. */ -+ uClibc or Bionic or musl is the default C library and whether -+ -muclibc or -mglibc or -mbionic or -mmusl has been passed to change -+ the default. */ - --#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ -- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" -+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ -+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" - - #if DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) - #elif DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) - #elif DEFAULT_LIBC == LIBC_BIONIC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) - #else - #error "Unsupported DEFAULT_LIBC" - #endif /* DEFAULT_LIBC */ -@@ -81,24 +87,100 @@ see the files COPYING3 and COPYING.RUNTI - #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" - #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" - #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32" -+/* Should be redefined for each target that supports musl. */ -+#define MUSL_DYNAMIC_LINKER "/dev/null" -+#define MUSL_DYNAMIC_LINKER32 "/dev/null" -+#define MUSL_DYNAMIC_LINKER64 "/dev/null" -+#define MUSL_DYNAMIC_LINKERX32 "/dev/null" - - #define GNU_USER_DYNAMIC_LINKER \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ -- BIONIC_DYNAMIC_LINKER) -+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) - #define GNU_USER_DYNAMIC_LINKER32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ -- BIONIC_DYNAMIC_LINKER32) -+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) - #define GNU_USER_DYNAMIC_LINKER64 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ -- BIONIC_DYNAMIC_LINKER64) -+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) - #define GNU_USER_DYNAMIC_LINKERX32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ -- BIONIC_DYNAMIC_LINKERX32) -+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32) - - /* Whether we have Bionic libc runtime */ - #undef TARGET_HAS_BIONIC - #define TARGET_HAS_BIONIC (OPTION_BIONIC) - -+/* musl avoids problematic includes by rearranging the include directories. -+ * Unfortunately, this is mostly duplicated from cppdefault.c */ -+#if DEFAULT_LIBC == LIBC_MUSL -+#define INCLUDE_DEFAULTS_MUSL_GPP \ -+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ -+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ -+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, -+ -+#ifdef LOCAL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_LOCAL \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_LOCAL -+#endif -+ -+#ifdef PREFIX_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_PREFIX -+#endif -+ -+#ifdef CROSS_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_CROSS \ -+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#ifdef TOOL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_TOOL \ -+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_TOOL -+#endif -+ -+#ifdef NATIVE_SYSTEM_HEADER_DIR -+#define INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_NATIVE -+#endif -+ -+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) -+# undef INCLUDE_DEFAULTS_MUSL_LOCAL -+# define INCLUDE_DEFAULTS_MUSL_LOCAL -+# undef INCLUDE_DEFAULTS_MUSL_NATIVE -+# define INCLUDE_DEFAULTS_MUSL_NATIVE -+#else -+# undef INCLUDE_DEFAULTS_MUSL_CROSS -+# define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#undef INCLUDE_DEFAULTS -+#define INCLUDE_DEFAULTS \ -+ { \ -+ INCLUDE_DEFAULTS_MUSL_GPP \ -+ INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ INCLUDE_DEFAULTS_MUSL_CROSS \ -+ INCLUDE_DEFAULTS_MUSL_TOOL \ -+ INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ -+ { 0, 0, 0, 0, 0, 0 } \ -+ } -+#endif -+ - #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ - /* This is a *uclinux* target. We don't define below macros to normal linux - versions, because doing so would require *uclinux* targets to include ---- a/gcc/config/linux.opt -+++ b/gcc/config/linux.opt -@@ -28,5 +28,9 @@ Target Report RejectNegative Var(linux_l - Use GNU C library - - muclibc --Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) -+Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mmusl) - Use uClibc C library -+ -+mmusl -+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mbionic) -+Use musl C library ---- a/gcc/configure -+++ b/gcc/configure -@@ -27833,6 +27833,9 @@ if test "${gcc_cv_libc_provides_ssp+set} - else - gcc_cv_libc_provides_ssp=no - case "$target" in -+ *-*-musl*) -+ # All versions of musl provide stack protector -+ gcc_cv_libc_provides_ssp=yes;; - *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) - # glibc 2.4 and later provides __stack_chk_fail and - # either __stack_chk_guard, or TLS access to stack guard canary. -@@ -27865,6 +27868,7 @@ fi - # ) and for now - # simply assert that glibc does provide this, which is true for all - # realistically usable GNU/Hurd configurations. -+ # All supported versions of musl provide it as well - gcc_cv_libc_provides_ssp=yes;; - *-*-darwin* | *-*-freebsd*) - ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail" -@@ -27961,6 +27965,9 @@ case "$target" in - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -+ *-linux-musl*) -+ gcc_cv_target_dl_iterate_phdr=yes -+ ;; - esac - - if test x$gcc_cv_target_dl_iterate_phdr = xyes; then ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -5287,6 +5287,9 @@ AC_CACHE_CHECK(__stack_chk_fail in targe - gcc_cv_libc_provides_ssp, - [gcc_cv_libc_provides_ssp=no - case "$target" in -+ *-*-musl*) -+ # All versions of musl provide stack protector -+ gcc_cv_libc_provides_ssp=yes;; - *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) - # glibc 2.4 and later provides __stack_chk_fail and - # either __stack_chk_guard, or TLS access to stack guard canary. -@@ -5313,6 +5316,7 @@ AC_CACHE_CHECK(__stack_chk_fail in targe - # ) and for now - # simply assert that glibc does provide this, which is true for all - # realistically usable GNU/Hurd configurations. -+ # All supported versions of musl provide it as well - gcc_cv_libc_provides_ssp=yes;; - *-*-darwin* | *-*-freebsd*) - AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], -@@ -5386,6 +5390,9 @@ case "$target" in - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -+ *-linux-musl*) -+ gcc_cv_target_dl_iterate_phdr=yes -+ ;; - esac - GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) - if test x$gcc_cv_target_dl_iterate_phdr = xyes; then ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -668,7 +668,7 @@ Objective-C and Objective-C++ Dialects}. - -mcpu=@var{cpu}} - - @emph{GNU/Linux Options} --@gccoptlist{-mglibc -muclibc -mbionic -mandroid @gol -+@gccoptlist{-mglibc -muclibc -mmusl -mbionic -mandroid @gol - -tno-android-cc -tno-android-ld} - - @emph{H8/300 Options} -@@ -15351,13 +15351,19 @@ These @samp{-m} options are defined for - @item -mglibc - @opindex mglibc - Use the GNU C library. This is the default except --on @samp{*-*-linux-*uclibc*} and @samp{*-*-linux-*android*} targets. -+on @samp{*-*-linux-*uclibc*}, @samp{*-*-linux-*musl*} and -+@samp{*-*-linux-*android*} targets. - - @item -muclibc - @opindex muclibc - Use uClibc C library. This is the default on - @samp{*-*-linux-*uclibc*} targets. - -+@item -mmusl -+@opindex mmusl -+Use the musl C library. This is the default on -+@samp{*-*-linux-*musl*} targets. -+ - @item -mbionic - @opindex mbionic - Use Bionic C library. This is the default on diff --git a/toolchain/gcc/patches/5.5.0/201-musl_arm.patch b/toolchain/gcc/patches/5.5.0/201-musl_arm.patch deleted file mode 100644 index 27a26afc05..0000000000 --- a/toolchain/gcc/patches/5.5.0/201-musl_arm.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: ktkachov -Date: Wed, 27 May 2015 13:17:11 +0000 (+0000) -Subject: [PATCH 4/13] arm musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=de799bd087ab9a179768fea75bd195a31d3432a4 - -[PATCH 4/13] arm musl support - -On behalf of szabolcs.nagy@arm.com - -2015-05-27 Gregor Richards - - * config/arm/linux-eabi.h (MUSL_DYNAMIC_LINKER): Define. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223749 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -77,6 +77,23 @@ - %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ - %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" - -+/* For ARM musl currently supports four dynamic linkers: -+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI -+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI -+ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB -+ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB -+ musl does not support the legacy OABI mode. -+ All the dynamic linkers live in /lib. -+ We default to soft-float, EL. */ -+#undef MUSL_DYNAMIC_LINKER -+#if TARGET_BIG_ENDIAN_DEFAULT -+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}" -+#else -+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" -+#endif -+#define MUSL_DYNAMIC_LINKER \ -+ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC diff --git a/toolchain/gcc/patches/5.5.0/202-musl_mips.patch b/toolchain/gcc/patches/5.5.0/202-musl_mips.patch deleted file mode 100644 index 816dd8d101..0000000000 --- a/toolchain/gcc/patches/5.5.0/202-musl_mips.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: ktkachov -Date: Fri, 8 May 2015 15:16:50 +0000 (+0000) -Subject: [PATCH 6/13] mips musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2550b6a866c887472b587bef87d433c51cf1ebc8 - -[PATCH 6/13] mips musl support - -2015-05-08 Gregor Richards - Szabolcs Nagy - - * config/mips/linux.h (MUSL_DYNAMIC_LINKER32): Define. - (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERN32): Define. - (GNU_USER_DYNAMIC_LINKERN32): Update. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222915 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/mips/linux.h -+++ b/gcc/config/mips/linux.h -@@ -37,7 +37,13 @@ along with GCC; see the file COPYING3. - #define UCLIBC_DYNAMIC_LINKERN32 \ - "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}" - -+#undef MUSL_DYNAMIC_LINKER32 -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1" -+#undef MUSL_DYNAMIC_LINKER64 -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1" -+#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1" -+ - #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" - #define GNU_USER_DYNAMIC_LINKERN32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ -- BIONIC_DYNAMIC_LINKERN32) -+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32) diff --git a/toolchain/gcc/patches/5.5.0/203-musl_powerpc.patch b/toolchain/gcc/patches/5.5.0/203-musl_powerpc.patch deleted file mode 100644 index 073c834ce1..0000000000 --- a/toolchain/gcc/patches/5.5.0/203-musl_powerpc.patch +++ /dev/null @@ -1,209 +0,0 @@ - -gcc/Changelog: - -2015-04-24 Gregor Richards - Szabolcs Nagy - - * config.gcc (secure_plt): Add *-linux*-musl*. - * config/rs6000/linux64.h (MUSL_DYNAMIC_LINKER32): Define. - (MUSL_DYNAMIC_LINKER64): Define. - (GNU_USER_DYNAMIC_LINKER32): Update. - (GNU_USER_DYNAMIC_LINKER64): Update. - (CHOOSE_DYNAMIC_LINKER): Update. - - * config/rs6000/secureplt.h (LINK_SECURE_PLT_DEFAULT_SPEC): Define. - * config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Update. - (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER_E,) - (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,) - (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,) - (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define. - (LINK_SECURE_PLT_DEFAULT_SPEC): Define. - (CHOOSE_DYNAMIC_LINKER, LINK_TARGET_SPEC, LINK_OS_LINUX_SPEC): Update. - - * config/rs6000/sysv4le.h (MUSL_DYNAMIC_LINKER_E): Define. - ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -365,17 +365,21 @@ extern int dot_symbols; - #endif - #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" - #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E ".so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" - #elif DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" - #else - #error "Unsupported DEFAULT_LIBC" - #endif - #define GNU_USER_DYNAMIC_LINKER32 \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) - #define GNU_USER_DYNAMIC_LINKER64 \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) - - #undef DEFAULT_ASM_ENDIAN - #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) ---- a/gcc/config/rs6000/secureplt.h -+++ b/gcc/config/rs6000/secureplt.h -@@ -18,3 +18,4 @@ along with GCC; see the file COPYING3. - . */ - - #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt" -+#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt" ---- a/gcc/config/rs6000/sysv4.h -+++ b/gcc/config/rs6000/sysv4.h -@@ -537,6 +537,9 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF - #ifndef CC1_SECURE_PLT_DEFAULT_SPEC - #define CC1_SECURE_PLT_DEFAULT_SPEC "" - #endif -+#ifndef LINK_SECURE_PLT_DEFAULT_SPEC -+#define LINK_SECURE_PLT_DEFAULT_SPEC "" -+#endif - - /* Pass -G xxx to the compiler. */ - #undef CC1_SPEC -@@ -574,7 +577,8 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF - %{R*} \ - %(link_shlib) \ - %{!T*: %(link_start) } \ --%(link_os)" -+%(link_os)" \ -+"%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}" - - /* Shared libraries are not default. */ - #define LINK_SHLIB_SPEC "\ -@@ -757,17 +761,22 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF - - #define LINK_START_LINUX_SPEC "" - -+#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","") -+ - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" - #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" - #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" - #else - #error "Unsupported DEFAULT_LIBC" - #endif - #define GNU_USER_DYNAMIC_LINKER \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) - - #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ - %{rdynamic:-export-dynamic} \ -@@ -889,6 +898,7 @@ ncrtn.o%s" - { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ - { "link_os_default", LINK_OS_DEFAULT_SPEC }, \ - { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ -+ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \ - { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ - { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ - { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ -@@ -943,3 +953,72 @@ ncrtn.o%s" - /* This target uses the sysv4.opt file. */ - #define TARGET_USES_SYSV4_OPT 1 - -+/* Include order changes for musl, same as in generic linux.h. */ -+#if DEFAULT_LIBC == LIBC_MUSL -+#define INCLUDE_DEFAULTS_MUSL_GPP \ -+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ -+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ -+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, -+ -+#ifdef LOCAL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_LOCAL \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_LOCAL -+#endif -+ -+#ifdef PREFIX_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_PREFIX -+#endif -+ -+#ifdef CROSS_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_CROSS \ -+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#ifdef TOOL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_TOOL \ -+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_TOOL -+#endif -+ -+#ifdef NATIVE_SYSTEM_HEADER_DIR -+#define INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_NATIVE -+#endif -+ -+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) -+# undef INCLUDE_DEFAULTS_MUSL_LOCAL -+# define INCLUDE_DEFAULTS_MUSL_LOCAL -+# undef INCLUDE_DEFAULTS_MUSL_NATIVE -+# define INCLUDE_DEFAULTS_MUSL_NATIVE -+#else -+# undef INCLUDE_DEFAULTS_MUSL_CROSS -+# define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#undef INCLUDE_DEFAULTS -+#define INCLUDE_DEFAULTS \ -+ { \ -+ INCLUDE_DEFAULTS_MUSL_GPP \ -+ INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ INCLUDE_DEFAULTS_MUSL_CROSS \ -+ INCLUDE_DEFAULTS_MUSL_TOOL \ -+ INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ -+ { 0, 0, 0, 0, 0, 0 } \ -+ } -+#endif ---- a/gcc/config/rs6000/sysv4le.h -+++ b/gcc/config/rs6000/sysv4le.h -@@ -31,3 +31,5 @@ - /* Little-endian PowerPC64 Linux uses the ELF v2 ABI by default. */ - #define LINUX64_DEFAULT_ABI_ELFv2 - -+#undef MUSL_DYNAMIC_LINKER_E -+#define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","le") ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -2430,6 +2430,10 @@ powerpc*-*-linux*) - powerpc*-*-linux*paired*) - tm_file="${tm_file} rs6000/750cl.h" ;; - esac -+ case ${target} in -+ *-linux*-musl*) -+ enable_secureplt=yes ;; -+ esac - if test x${enable_secureplt} = xyes; then - tm_file="rs6000/secureplt.h ${tm_file}" - fi diff --git a/toolchain/gcc/patches/5.5.0/204-musl_sh.patch b/toolchain/gcc/patches/5.5.0/204-musl_sh.patch deleted file mode 100644 index 8c3753d530..0000000000 --- a/toolchain/gcc/patches/5.5.0/204-musl_sh.patch +++ /dev/null @@ -1,39 +0,0 @@ -gcc/Changelog: - -2015-04-27 Gregor Richards - Szabolcs Nagy - - * config/sh/linux.h (MUSL_DYNAMIC_LINKER): Define. - (MUSL_DYNAMIC_LINKER_E, MUSL_DYNAMIC_LINKER_FP): Define. - ---- a/gcc/config/sh/linux.h -+++ b/gcc/config/sh/linux.h -@@ -43,6 +43,28 @@ along with GCC; see the file COPYING3. - - #define TARGET_ASM_FILE_END file_end_indicate_exec_stack - -+#if TARGET_ENDIAN_DEFAULT == MASK_LITTLE_ENDIAN -+#define MUSL_DYNAMIC_LINKER_E "%{mb:eb}" -+#else -+#define MUSL_DYNAMIC_LINKER_E "%{!ml:eb}" -+#endif -+ -+#if TARGET_CPU_DEFAULT & ( MASK_HARD_SH2A_DOUBLE | MASK_SH4 ) -+/* "-nofpu" if any nofpu option is specified */ -+#define MUSL_DYNAMIC_LINKER_FP \ -+ "%{m1|m2|m2a-nofpu|m3|m4-nofpu|m4-100-nofpu|m4-200-nofpu|m4-300-nofpu|" \ -+ "m4-340|m4-400|m4-500|m4al|m5-32media-nofpu|m5-64media-nofpu|" \ -+ "m5-compact-nofpu:-nofpu}" -+#else -+/* "-nofpu" if none of the hard fpu options are specified */ -+#define MUSL_DYNAMIC_LINKER_FP \ -+ "%{m2a|m4|m4-100|m4-200|m4-300|m4a|m5-32media|m5-64media|m5-compact:;:-nofpu}" -+#endif -+ -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER \ -+ "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP ".so.1" -+ - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #undef SUBTARGET_LINK_EMUL_SUFFIX diff --git a/toolchain/gcc/patches/5.5.0/205-musl_x86.patch b/toolchain/gcc/patches/5.5.0/205-musl_x86.patch deleted file mode 100644 index 8772328d64..0000000000 --- a/toolchain/gcc/patches/5.5.0/205-musl_x86.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: ktkachov -Date: Fri, 15 May 2015 13:20:01 +0000 (+0000) -Subject: [PATCH 9/13] x86 musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=5551c8d927c17f60837f15f8dfe46f945ba3fa9c - -[PATCH 9/13] x86 musl support - -On behalf of Szabolcs Nagy. - -2015-05-15 Gregor Richards - - * config/i386/linux.h (MUSL_DYNAMIC_LINKER): Define. - * config/i386/linux64.h (MUSL_DYNAMIC_LINKER32): Define. - (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32): Define. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223218 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/i386/linux.h -+++ b/gcc/config/i386/linux.h -@@ -21,3 +21,6 @@ along with GCC; see the file COPYING3. - - #define GNU_USER_LINK_EMULATION "elf_i386" - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+ -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" ---- a/gcc/config/i386/linux64.h -+++ b/gcc/config/i386/linux64.h -@@ -30,3 +30,10 @@ see the files COPYING3 and COPYING.RUNTI - #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" - #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" - #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" -+ -+#undef MUSL_DYNAMIC_LINKER32 -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" -+#undef MUSL_DYNAMIC_LINKER64 -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" -+#undef MUSL_DYNAMIC_LINKERX32 -+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" diff --git a/toolchain/gcc/patches/5.5.0/206-musl_aarch64.patch b/toolchain/gcc/patches/5.5.0/206-musl_aarch64.patch deleted file mode 100644 index 6925a026e7..0000000000 --- a/toolchain/gcc/patches/5.5.0/206-musl_aarch64.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: jgreenhalgh -Date: Wed, 27 May 2015 16:46:39 +0000 (+0000) -Subject: [PATCH 3/13] aarch64 musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=b3ff21cf0531be91bc3fb8200296a7633090ec78 - -[PATCH 3/13] aarch64 musl support - -gcc/Changelog: - -2015-05-27 Gregor Richards - Szabolcs Nagy - - * config/aarch64/aarch64-linux.h (MUSL_DYNAMIC_LINKER): Define. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223766 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/aarch64/aarch64-linux.h -+++ b/gcc/config/aarch64/aarch64-linux.h -@@ -23,6 +23,9 @@ - - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" - -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" -+ - #undef ASAN_CC1_SPEC - #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" - diff --git a/toolchain/gcc/patches/5.5.0/207-musl_fixincludes.patch b/toolchain/gcc/patches/5.5.0/207-musl_fixincludes.patch deleted file mode 100644 index 0ff33d39d8..0000000000 --- a/toolchain/gcc/patches/5.5.0/207-musl_fixincludes.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: ktkachov -Date: Wed, 22 Apr 2015 14:18:16 +0000 (+0000) -Subject: fixincludes update for musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2dc727de2e87c2756a514cbb43cea23c99deaa3d - -fixincludes update for musl support - -On behalf of Szabolcs.Nagy@arm.com - -2015-04-22 Gregor Richards - - * mkfixinc.sh: Add *-musl* with no fixes. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222327 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/fixincludes/mkfixinc.sh -+++ b/fixincludes/mkfixinc.sh -@@ -19,7 +19,8 @@ case $machine in - powerpc-*-eabi* | \ - powerpc-*-rtems* | \ - powerpcle-*-eabisim* | \ -- powerpcle-*-eabi* ) -+ powerpcle-*-eabi* | \ -+ *-musl* ) - # IF there is no include fixing, - # THEN create a no-op fixer and exit - (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} diff --git a/toolchain/gcc/patches/5.5.0/209-musl_libstdc++.patch b/toolchain/gcc/patches/5.5.0/209-musl_libstdc++.patch deleted file mode 100644 index d2414d0232..0000000000 --- a/toolchain/gcc/patches/5.5.0/209-musl_libstdc++.patch +++ /dev/null @@ -1,72 +0,0 @@ -From: ktkachov -Date: Wed, 22 Apr 2015 14:24:11 +0000 (+0000) -Subject: libstdc++, libgfortran gthr workaround for musl -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=1e5f711c11cb80ce609db9e9c1d8b2da0f7b5b61 - -libstdc++, libgfortran gthr workaround for musl - -On behalf of szabolcs.nagy@arm.com - -[libstdc++-v3/] -2015-04-22 Szabolcs Nagy - - * config/os/generic/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK): Define. - * configure.host (os_include_dir): Set to "os/generic" for linux-musl*. - -[libgfortran/] -2015-04-22 Szabolcs Nagy - - * acinclude.m4 (GTHREAD_USE_WEAK): Define as 0 for *-*-musl*. - * configure: Regenerate. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222329 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/libgfortran/acinclude.m4 -+++ b/libgfortran/acinclude.m4 -@@ -100,7 +100,7 @@ void foo (void); - [Define to 1 if the target supports #pragma weak]) - fi - case "$host" in -- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) -+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) - AC_DEFINE(GTHREAD_USE_WEAK, 0, - [Define to 0 if the target shouldn't use #pragma weak]) - ;; ---- a/libgfortran/configure -+++ b/libgfortran/configure -@@ -26456,7 +26456,7 @@ $as_echo "#define SUPPORTS_WEAK 1" >>con - - fi - case "$host" in -- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) -+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) - - $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h - ---- a/libstdc++-v3/config/os/generic/os_defines.h -+++ b/libstdc++-v3/config/os/generic/os_defines.h -@@ -33,4 +33,9 @@ - // System-specific #define, typedefs, corrections, etc, go here. This - // file will come before all others. - -+// Disable the weak reference logic in gthr.h for os/generic because it -+// is broken on every platform unless there is implementation specific -+// workaround in gthr-posix.h and at link-time for static linking. -+#define _GLIBCXX_GTHREAD_USE_WEAK 0 -+ - #endif ---- a/libstdc++-v3/configure.host -+++ b/libstdc++-v3/configure.host -@@ -273,6 +273,9 @@ case "${host_os}" in - freebsd*) - os_include_dir="os/bsd/freebsd" - ;; -+ linux-musl*) -+ os_include_dir="os/generic" -+ ;; - gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) - if [ "$uclibc" = "yes" ]; then - os_include_dir="os/uclibc" diff --git a/toolchain/gcc/patches/5.5.0/230-musl_libssp.patch b/toolchain/gcc/patches/5.5.0/230-musl_libssp.patch deleted file mode 100644 index 30f42e9f7c..0000000000 --- a/toolchain/gcc/patches/5.5.0/230-musl_libssp.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -727,7 +727,9 @@ proper position among the other output f - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" - #else diff --git a/toolchain/gcc/patches/5.5.0/240-musl-libitm-fixes.patch b/toolchain/gcc/patches/5.5.0/240-musl-libitm-fixes.patch deleted file mode 100644 index 533cb68499..0000000000 --- a/toolchain/gcc/patches/5.5.0/240-musl-libitm-fixes.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: ktkachov -Date: Wed, 22 Apr 2015 14:11:25 +0000 (+0000) -Subject: libitm fixes for musl support -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=e53a4d49c3d03ab8eaddb073cf972c1c46d75338 - -libitm fixes for musl support - -On behalf of Szabolcs.Nagy@arm.com - -2015-04-22 Gregor Richards - - * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h. - * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222325 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/libitm/config/arm/hwcap.cc -+++ b/libitm/config/arm/hwcap.cc -@@ -40,7 +40,7 @@ int GTM_hwcap HIDDEN = 0 - - #ifdef __linux__ - #include --#include -+#include - #include - - static void __attribute__((constructor)) ---- a/libitm/config/linux/x86/tls.h -+++ b/libitm/config/linux/x86/tls.h -@@ -25,16 +25,19 @@ - #ifndef LIBITM_X86_TLS_H - #define LIBITM_X86_TLS_H 1 - --#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) -+#if defined(__GLIBC_PREREQ) -+#if __GLIBC_PREREQ(2, 10) - /* Use slots in the TCB head rather than __thread lookups. - GLIBC has reserved words 10 through 13 for TM. */ - #define HAVE_ARCH_GTM_THREAD 1 - #define HAVE_ARCH_GTM_THREAD_DISP 1 - #endif -+#endif - - #include "config/generic/tls.h" - --#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) -+#if defined(__GLIBC_PREREQ) -+#if __GLIBC_PREREQ(2, 10) - namespace GTM HIDDEN { - - #ifdef __x86_64__ -@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct a - - } // namespace GTM - #endif /* >= GLIBC 2.10 */ -+#endif - - #endif // LIBITM_X86_TLS_H diff --git a/toolchain/gcc/patches/5.5.0/250-add-musl.patch b/toolchain/gcc/patches/5.5.0/250-add-musl.patch deleted file mode 100644 index 8cbeddea33..0000000000 --- a/toolchain/gcc/patches/5.5.0/250-add-musl.patch +++ /dev/null @@ -1,120 +0,0 @@ -From: ktkachov -Date: Fri, 8 May 2015 08:30:40 +0000 (+0000) -Subject: [PATCH 0/13] Add musl support to GCC -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=f2d678afa5b8385d763b93772d73d6bf80a9739e - -[PATCH 0/13] Add musl support to GCC - -2015-05-08 Szabolcs Nagy - - * config/glibc-stdint.h (OPTION_MUSL): Define. - (INT_FAST16_TYPE, INT_FAST32_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE): - Change the definition based on OPTION_MUSL for 64 bit targets. - * config/linux.h (OPTION_MUSL): Redefine. - * config/alpha/linux.h (OPTION_MUSL): Redefine. - * config/rs6000/linux.h (OPTION_MUSL): Redefine. - * config/rs6000/linux64.h (OPTION_MUSL): Redefine. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222905 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/gcc/config/alpha/linux.h -+++ b/gcc/config/alpha/linux.h -@@ -61,10 +61,14 @@ along with GCC; see the file COPYING3. - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - /* Determine what functions are present at the runtime; ---- a/gcc/config/glibc-stdint.h -+++ b/gcc/config/glibc-stdint.h -@@ -22,6 +22,12 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+/* Systems using musl libc should use this header and make sure -+ OPTION_MUSL is defined correctly before using the TYPE macros. */ -+#ifndef OPTION_MUSL -+#define OPTION_MUSL 0 -+#endif -+ - #define SIG_ATOMIC_TYPE "int" - - #define INT8_TYPE "signed char" -@@ -43,12 +49,12 @@ see the files COPYING3 and COPYING.RUNTI - #define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") - - #define INT_FAST8_TYPE "signed char" --#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") --#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") -+#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int") -+#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int") - #define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int") - #define UINT_FAST8_TYPE "unsigned char" --#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int") --#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int") -+#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int") -+#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int") - #define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") - - #define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -32,11 +32,13 @@ see the files COPYING3 and COPYING.RUNTI - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL - #define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL - #define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -30,10 +30,14 @@ - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - /* Determine what functions are present at the runtime; ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -299,10 +299,14 @@ extern int dot_symbols; - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - /* Determine what functions are present at the runtime; diff --git a/toolchain/gcc/patches/5.5.0/260-musl-add-unwind-fix.patch b/toolchain/gcc/patches/5.5.0/260-musl-add-unwind-fix.patch deleted file mode 100644 index a3b83e2074..0000000000 --- a/toolchain/gcc/patches/5.5.0/260-musl-add-unwind-fix.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: ktkachov -Date: Wed, 22 Apr 2015 14:20:01 +0000 (+0000) -Subject: unwind fix for musl -X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a2e31d0681d8a47389b8a3552622fbd9827bcef4 - -unwind fix for musl - -On behalf of szabolcs.nagy@arm.com - -2015-04-22 Gregor Richards - Szabolcs Nagy - - * unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME): Define it on - Linux if target provides dl_iterate_phdr. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222328 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - ---- a/libgcc/unwind-dw2-fde-dip.c -+++ b/libgcc/unwind-dw2-fde-dip.c -@@ -59,6 +59,12 @@ - - #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ - && defined(TARGET_DL_ITERATE_PHDR) \ -+ && defined(__linux__) -+# define USE_PT_GNU_EH_FRAME -+#endif -+ -+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -+ && defined(TARGET_DL_ITERATE_PHDR) \ - && (defined(__DragonFly__) || defined(__FreeBSD__)) - # define ElfW __ElfN - # define USE_PT_GNU_EH_FRAME diff --git a/toolchain/gcc/patches/5.5.0/270-musl-add-powerpc-softfloat-fix.patch b/toolchain/gcc/patches/5.5.0/270-musl-add-powerpc-softfloat-fix.patch deleted file mode 100644 index bdebf6c01f..0000000000 --- a/toolchain/gcc/patches/5.5.0/270-musl-add-powerpc-softfloat-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -369,8 +369,8 @@ extern int dot_symbols; - #endif - #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" - #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" --#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" --#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E ".so.1" -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC - #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" - #elif DEFAULT_LIBC == LIBC_GLIBC ---- a/gcc/config/rs6000/sysv4.h -+++ b/gcc/config/rs6000/sysv4.h -@@ -765,7 +765,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF - - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" - #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" --#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E ".so.1" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC - #define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" - #elif DEFAULT_LIBC == LIBC_MUSL diff --git a/toolchain/gcc/patches/5.5.0/280-musl-disable-ifunc-by-default.patch b/toolchain/gcc/patches/5.5.0/280-musl-disable-ifunc-by-default.patch deleted file mode 100644 index 9a043eed3c..0000000000 --- a/toolchain/gcc/patches/5.5.0/280-musl-disable-ifunc-by-default.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 450fb05e2a7510d37744f044009f8237d902f65c Mon Sep 17 00:00:00 2001 -From: nsz -Date: Tue, 30 Aug 2016 10:26:22 +0000 -Subject: [PATCH] disable ifunc on *-musl by default - -gcc/ - * config.gcc (*-*-*musl*): Disable gnu-indirect-function. - - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239859 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - gcc/ChangeLog | 4 ++++ - gcc/config.gcc | 4 ++-- - 2 files changed, 6 insertions(+), 2 deletions(-) - ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -1455,7 +1455,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfree - extra_options="${extra_options} linux-android.opt" - # Assume modern glibc if not targeting Android nor uclibc. - case ${target} in -- *-*-*android*|*-*-*uclibc*) -+ *-*-*android*|*-*-*uclibc*|*-*-*musl*) - ;; - *) - default_gnu_indirect_function=yes -@@ -1524,7 +1524,7 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu - extra_options="${extra_options} linux-android.opt" - # Assume modern glibc if not targeting Android nor uclibc. - case ${target} in -- *-*-*android*|*-*-*uclibc*) -+ *-*-*android*|*-*-*uclibc*|*-*-*musl*) - ;; - *) - default_gnu_indirect_function=yes diff --git a/toolchain/gcc/patches/5.5.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches/5.5.0/300-mips_Os_cpu_rtx_cost_model.patch deleted file mode 100644 index 1743658ac6..0000000000 --- a/toolchain/gcc/patches/5.5.0/300-mips_Os_cpu_rtx_cost_model.patch +++ /dev/null @@ -1,14 +0,0 @@ -Use the proper rtx cost model for the selected CPU, even when optimizing -for size. This generates better code. - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -17483,7 +17483,7 @@ mips_option_override (void) - flag_pcc_struct_return = 0; - - /* Decide which rtx_costs structure to use. */ -- if (optimize_size) -+ if (0 && optimize_size) - mips_cost = &mips_rtx_cost_optimize_size; - else - mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/toolchain/gcc/patches/5.5.0/800-arm_v5te_no_ldrd_strd.patch b/toolchain/gcc/patches/5.5.0/800-arm_v5te_no_ldrd_strd.patch deleted file mode 100644 index 0edeb13c75..0000000000 --- a/toolchain/gcc/patches/5.5.0/800-arm_v5te_no_ldrd_strd.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/arm/arm.h -+++ b/gcc/config/arm/arm.h -@@ -285,7 +285,7 @@ extern void (*arm_lang_output_object_att - /* Thumb-1 only. */ - #define TARGET_THUMB1_ONLY (TARGET_THUMB1 && !arm_arch_notm) - --#define TARGET_LDRD (arm_arch5e && ARM_DOUBLEWORD_ALIGN \ -+#define TARGET_LDRD (arm_arch6 && ARM_DOUBLEWORD_ALIGN \ - && !TARGET_THUMB1) - - #define TARGET_CRC32 (arm_arch_crc) diff --git a/toolchain/gcc/patches/5.5.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/5.5.0/810-arm-softfloat-libgcc.patch deleted file mode 100644 index 1d06f5b2ec..0000000000 --- a/toolchain/gcc/patches/5.5.0/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,10 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -60,8 +60,6 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -- - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/toolchain/gcc/patches/5.5.0/820-libgcc_pic.patch b/toolchain/gcc/patches/5.5.0/820-libgcc_pic.patch deleted file mode 100644 index 42bf0c8ccc..0000000000 --- a/toolchain/gcc/patches/5.5.0/820-libgcc_pic.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -887,11 +887,12 @@ $(libgcov-driver-objects): %$(objext): $ - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -913,7 +914,7 @@ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_E - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - endif -@@ -1108,6 +1109,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/toolchain/gcc/patches/5.5.0/830-arm_unbreak_armv4t.patch b/toolchain/gcc/patches/5.5.0/830-arm_unbreak_armv4t.patch deleted file mode 100644 index 37f8f2a54d..0000000000 --- a/toolchain/gcc/patches/5.5.0/830-arm_unbreak_armv4t.patch +++ /dev/null @@ -1,13 +0,0 @@ -http://sourceware.org/ml/crossgcc/2008-05/msg00009.html - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -45,7 +45,7 @@ - The ARM10TDMI core is the default for armv5t, so set - SUBTARGET_CPU_DEFAULT to achieve this. */ - #undef SUBTARGET_CPU_DEFAULT --#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi -+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi - - /* TARGET_BIG_ENDIAN_DEFAULT is set in - config.gcc for big endian configurations. */ diff --git a/toolchain/gcc/patches/5.5.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/5.5.0/840-armv4_pass_fix-v4bx_to_ld.patch deleted file mode 100644 index cb1fb98235..0000000000 --- a/toolchain/gcc/patches/5.5.0/840-armv4_pass_fix-v4bx_to_ld.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -94,10 +94,15 @@ - #define MUSL_DYNAMIC_LINKER \ - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ -+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - diff --git a/toolchain/gcc/patches/5.5.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches/5.5.0/850-use_shared_libgcc.patch deleted file mode 100644 index 5818cf4da0..0000000000 --- a/toolchain/gcc/patches/5.5.0/850-use_shared_libgcc.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -131,10 +131,6 @@ - #define ENDFILE_SPEC \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -53,6 +53,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_assert ("system=posix"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic or musl is the default C library and whether - -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -132,5 +132,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -60,6 +60,9 @@ - #undef CPP_OS_DEFAULT_SPEC - #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" - diff --git a/toolchain/gcc/patches/5.5.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches/5.5.0/851-libgcc_no_compat.patch deleted file mode 100644 index 80c3476841..0000000000 --- a/toolchain/gcc/patches/5.5.0/851-libgcc_no_compat.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/toolchain/gcc/patches/5.5.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/5.5.0/870-ppc_no_crtsavres.patch deleted file mode 100644 index d06673efc2..0000000000 --- a/toolchain/gcc/patches/5.5.0/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/rs6000/rs6000.c -+++ b/gcc/config/rs6000/rs6000.c -@@ -21528,7 +21528,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/toolchain/gcc/patches/5.5.0/880-no_java_section.patch b/toolchain/gcc/patches/5.5.0/880-no_java_section.patch deleted file mode 100644 index def6c9f4a0..0000000000 --- a/toolchain/gcc/patches/5.5.0/880-no_java_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/defaults.h -+++ b/gcc/defaults.h -@@ -380,7 +380,7 @@ see the files COPYING3 and COPYING.RUNTI - /* If we have named section and we support weak symbols, then use the - .jcr section for recording java classes which need to be registered - at program start-up time. */ --#if defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK -+#if 0 && defined (TARGET_ASM_NAMED_SECTION) && SUPPORTS_WEAK - #ifndef JCR_SECTION_NAME - #define JCR_SECTION_NAME ".jcr" - #endif diff --git a/toolchain/gcc/patches/5.5.0/881-no_tm_section.patch b/toolchain/gcc/patches/5.5.0/881-no_tm_section.patch deleted file mode 100644 index fab5db3be5..0000000000 --- a/toolchain/gcc/patches/5.5.0/881-no_tm_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #endif - - /* We do not want to add the weak attribute to the declarations of these diff --git a/toolchain/gcc/patches/5.5.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches/5.5.0/900-bad-mips16-crt.patch deleted file mode 100644 index dd6e9dc889..0000000000 --- a/toolchain/gcc/patches/5.5.0/900-bad-mips16-crt.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/libgcc/config/mips/t-mips16 -+++ b/libgcc/config/mips/t-mips16 -@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 - - # Version these symbols if building libgcc.so. - SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver -+ -+CRTSTUFF_T_CFLAGS += -mno-mips16 -+CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/toolchain/gcc/patches/5.5.0/910-mbsd_multi.patch b/toolchain/gcc/patches/5.5.0/910-mbsd_multi.patch deleted file mode 100644 index 88905f6f2f..0000000000 --- a/toolchain/gcc/patches/5.5.0/910-mbsd_multi.patch +++ /dev/null @@ -1,222 +0,0 @@ - - This patch brings over a few features from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - * -Werror-maybe-reset - Has the effect of -Wno-error if GCC_NO_WERROR is - set and not '0', a no-operation otherwise. This is - to be able to use -Werror in "make" but prevent - GNU autoconf generated configure scripts from - freaking out. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -122,6 +122,9 @@ static int class_dump_flags; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -449,6 +452,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1039,6 +1048,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -431,6 +431,10 @@ Wfloat-conversion - C ObjC C++ ObjC++ Var(warn_float_conversion) LangEnabledBy(C ObjC C++ ObjC++,Wconversion) - Warn for implicit type conversions that cause loss of floating point precision - -+Werror-maybe-reset -+C ObjC C++ ObjC++ -+; Documented in common.opt -+ - Wfloat-equal - C ObjC C++ ObjC++ Var(warn_float_equal) Warning - Warn if testing floating point numbers for equality -@@ -1161,6 +1165,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ Ignore Warn(switch %qs is no longer supported) - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -561,6 +561,10 @@ Werror= - Common Joined - Treat specified warning as error - -+Werror-maybe-reset -+Common -+If environment variable GCC_NO_WERROR is set, act as -Wno-error -+ - Wextra - Common Var(extra_warnings) Warning - Print extra (possibly unwanted) warnings -@@ -1360,6 +1364,9 @@ fguess-branch-probability - Common Report Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -1699,6 +1699,17 @@ common_handle_option (struct gcc_options - opts, opts_set, loc, dc); - break; - -+ case OPT_Werror_maybe_reset: -+ { -+ char *ev = getenv ("GCC_NO_WERROR"); -+ if ((ev != NULL) && (*ev != '0')) -+ warnings_are_errors = 0; -+ } -+ break; -+ -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Wlarger_than_: - opts->x_larger_than_size = value; - opts->x_warn_larger_than = value != -1; ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -163,6 +163,11 @@ in older programs. This warning is on b - Make all warnings into hard errors. Source code which triggers warnings - will be rejected. - -+@item -Werror-maybe-reset -+@opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ - @item -Wsystem-headers - @opindex Wsystem-headers - Issue warnings for code in system headers. These are normally unhelpful ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -251,7 +251,7 @@ Objective-C and Objective-C++ Dialects}. - -Wdisabled-optimization @gol - -Wno-discarded-qualifiers -Wno-discarded-array-qualifiers @gol - -Wno-div-by-zero -Wdouble-promotion -Wempty-body -Wenum-compare @gol ---Wno-endif-labels -Werror -Werror=* @gol -+-Wno-endif-labels -Werror -Werror=* -Werror-maybe-reset @gol - -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol - -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol - -Wformat-security -Wformat-signedness -Wformat-y2k @gol -@@ -5388,6 +5388,22 @@ This option is only supported for C and - @option{-Wall} and by @option{-Wpedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+@item -Werror-maybe-reset -+@opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ -+@item -fhonour-copts -+@opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector -@@ -7866,7 +7882,7 @@ so, the first branch is redirected to ei - second branch or a point immediately following it, depending on whether - the condition is known to be true or false. - --Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -+Enabled at levels @option{-O3}. - - @item -fsplit-wide-types - @opindex fsplit-wide-types ---- a/gcc/java/jvspec.c -+++ b/gcc/java/jvspec.c -@@ -629,6 +629,7 @@ lang_specific_pre_link (void) - class name. Append dummy `.c' that can be stripped by set_input so %b - is correct. */ - set_input (concat (main_class_name, "main.c", NULL)); -+ putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack! */ - err = do_spec (jvgenmain_spec); - if (err == 0) - { diff --git a/toolchain/gcc/patches/5.5.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/5.5.0/920-specs_nonfatal_getenv.patch deleted file mode 100644 index 4c705ad86b..0000000000 --- a/toolchain/gcc/patches/5.5.0/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -8828,8 +8828,10 @@ getenv_spec_function (int argc, const ch - - value = getenv (argv[0]); - if (!value) -- fatal_error (input_location, -- "environment variable %qs not defined", argv[0]); -+ { -+ warning (input_location, "environment variable %qs not defined", argv[0]); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/toolchain/gcc/patches/5.5.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/5.5.0/930-fix-mips-noexecstack.patch deleted file mode 100644 index c05844d2e4..0000000000 --- a/toolchain/gcc/patches/5.5.0/930-fix-mips-noexecstack.patch +++ /dev/null @@ -1,111 +0,0 @@ -From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 -From: Andrew McDonnell -Date: Fri, 3 Oct 2014 19:09:00 +0930 -Subject: Add .note.GNU-stack section - -See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html -Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html - -Re: [Patch, MIPS] Add .note.GNU-stack section - - From: Steve Ellcey - -On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: -> -> -> On Wed, Sep 10, 2014 at 9:27 AM, wrote: - -> This works except you did not update the assembly files in -> libgcc or glibc. We (Cavium) have the same patch in our tree -> for a few released versions. - -> Mind just checking yours in then Andrew? - -> Thanks! -> -eric - -I talked to Andrew about what files he changed in GCC and created and -tested this new patch. Andrew also mentioned changing some assembly -files in glibc but I don't see any use of '.section .note.GNU-stack' in -any assembly files in glibc (for any platform) so I wasn't planning on -creating a glibc to add them to mips glibc assembly language files. - -OK to check in this patch? - -Steve Ellcey -sellcey@mips.com - - - -2014-09-26 Steve Ellcey ---- - gcc/config/mips/mips.c | 3 +++ - libgcc/config/mips/crti.S | 4 ++++ - libgcc/config/mips/crtn.S | 3 +++ - libgcc/config/mips/mips16.S | 4 ++++ - libgcc/config/mips/vr4120-div.S | 4 ++++ - 5 files changed, 18 insertions(+) - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -19629,6 +19629,9 @@ mips_lra_p (void) - #undef TARGET_LRA_P - #define TARGET_LRA_P mips_lra_p - -+#undef TARGET_ASM_FILE_END -+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+ - struct gcc_target targetm = TARGET_INITIALIZER; - - #include "gt-mips.h" ---- a/libgcc/config/mips/crti.S -+++ b/libgcc/config/mips/crti.S -@@ -21,6 +21,10 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+ -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/crtn.S -+++ b/libgcc/config/mips/crtn.S -@@ -21,6 +21,9 @@ a copy of the GCC Runtime Library Except - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/mips16.S -+++ b/libgcc/config/mips/mips16.S -@@ -48,6 +48,10 @@ see the files COPYING3 and COPYING.RUNTI - values using the soft-float calling convention, but do the actual - operation using the hard floating point instructions. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) - - /* This file contains 32-bit assembly code. */ ---- a/libgcc/config/mips/vr4120-div.S -+++ b/libgcc/config/mips/vr4120-div.S -@@ -26,6 +26,10 @@ see the files COPYING3 and COPYING.RUNTI - -mfix-vr4120. div and ddiv do not give the correct result when one - of the operands is negative. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - .set nomips16 - - #define DIV \ diff --git a/toolchain/gcc/patches/5.5.0/931-fix-MIPS-softfloat-build-issue.patch b/toolchain/gcc/patches/5.5.0/931-fix-MIPS-softfloat-build-issue.patch deleted file mode 100644 index 9ac0939eb0..0000000000 --- a/toolchain/gcc/patches/5.5.0/931-fix-MIPS-softfloat-build-issue.patch +++ /dev/null @@ -1,167 +0,0 @@ -From 2b46f9187b6f994fc450628a7cd97fc703dd23e0 Mon Sep 17 00:00:00 2001 -From: BangLang Huang -Date: Wed, 9 Nov 2016 10:36:49 +0800 -Subject: [PATCH] fix MIPS softfloat build issue - - This patch is backport from github/libffi #272 - -Signed-off-by: BangLang Huang ---- - libffi/src/mips/n32.S | 17 +++++++++++++++++ - libffi/src/mips/o32.S | 17 +++++++++++++++++ - 2 files changed, 34 insertions(+) - ---- a/libffi/src/mips/n32.S -+++ b/libffi/src/mips/n32.S -@@ -107,6 +107,16 @@ loadregs: - - REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. - -+#ifdef __mips_soft_float -+ REG_L a0, 0*FFI_SIZEOF_ARG(t9) -+ REG_L a1, 1*FFI_SIZEOF_ARG(t9) -+ REG_L a2, 2*FFI_SIZEOF_ARG(t9) -+ REG_L a3, 3*FFI_SIZEOF_ARG(t9) -+ REG_L a4, 4*FFI_SIZEOF_ARG(t9) -+ REG_L a5, 5*FFI_SIZEOF_ARG(t9) -+ REG_L a6, 6*FFI_SIZEOF_ARG(t9) -+ REG_L a7, 7*FFI_SIZEOF_ARG(t9) -+#else - and t4, t6, ((1</dev/null -+ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null - @$(STAMP) stamp-bits-sup - - stamp-c_base: ${c_base_headers} diff --git a/toolchain/gcc/patches/5.5.0/950-cpp_file_path_translation.patch b/toolchain/gcc/patches/5.5.0/950-cpp_file_path_translation.patch deleted file mode 100644 index b67940897e..0000000000 --- a/toolchain/gcc/patches/5.5.0/950-cpp_file_path_translation.patch +++ /dev/null @@ -1,182 +0,0 @@ -Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047 - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -581,6 +581,10 @@ c_common_handle_option (size_t scode, co - add_path (xstrdup (arg), SYSTEM, 0, true); - break; - -+ case OPT_iremap: -+ add_cpp_remap_path (arg); -+ break; -+ - case OPT_iwithprefix: - add_prefixed_path (arg, SYSTEM); - break; ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1528,6 +1528,10 @@ iquote - C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) - -iquote Add to the end of the quote include path - -+iremap -+C ObjC C++ ObjC++ Joined Separate -+-iremap Convert to if it occurs as prefix in __FILE__. -+ - iwithprefix - C ObjC C++ ObjC++ Joined Separate - -iwithprefix Add to the end of the system include path ---- a/gcc/doc/cpp.texi -+++ b/gcc/doc/cpp.texi -@@ -4441,6 +4441,7 @@ without notice. - @c man begin SYNOPSIS - cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}] - [@option{-I}@var{dir}@dots{}] [@option{-iquote}@var{dir}@dots{}] -+ [@option{-iremap}@var{src}:@var{dst}] - [@option{-W}@var{warn}@dots{}] - [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] - [@option{-MP}] [@option{-MQ} @var{target}@dots{}] ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -532,6 +532,12 @@ Search @var{dir} only for header files r - If @var{dir} begins with @code{=}, then the @code{=} will be replaced - by the sysroot prefix; see @option{--sysroot} and @option{-isysroot}. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -fdirectives-only - @opindex fdirectives-only - When preprocessing, handle directives, but do not expand macros. ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -494,8 +494,8 @@ Objective-C and Objective-C++ Dialects}. - @item Directory Options - @xref{Directory Options,,Options for Directory Search}. - @gccoptlist{-B@var{prefix} -I@var{dir} -iplugindir=@var{dir} @gol ---iquote@var{dir} -L@var{dir} -specs=@var{file} -I- @gol ----sysroot=@var{dir} --no-sysroot-suffix} -+-iquote@var{dir} -iremap@var{src}:@var{dst} -L@var{dir} -specs=@var{file} @gol -+-I- --sysroot=@var{dir} --no-sysroot-suffix} - - @item Machine Dependent Options - @xref{Submodel Options,,Hardware Models and Configurations}. -@@ -11485,6 +11485,12 @@ be searched for header files only for th - "@var{file}"}; they are not searched for @code{#include <@var{file}>}, - otherwise just like @option{-I}. - -+@item -iremap @var{src}:@var{dst} -+@opindex iremap -+Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. -+This option can be specified more than once. Processing stops at the first -+match. -+ - @item -L@var{dir} - @opindex L - Add directory @var{dir} to the list of directories to be searched ---- a/libcpp/include/cpplib.h -+++ b/libcpp/include/cpplib.h -@@ -751,6 +751,9 @@ extern void cpp_set_lang (cpp_reader *, - /* Set the include paths. */ - extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int); - -+/* Provide src:dst pair for __FILE__ remapping. */ -+extern void add_cpp_remap_path (const char *); -+ - /* Call these to get pointers to the options, callback, and deps - structures for a given reader. These pointers are good until you - call cpp_finish on that reader. You can either edit the callbacks ---- a/libcpp/macro.c -+++ b/libcpp/macro.c -@@ -224,6 +224,64 @@ static const char * const monthnames[] = - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" - }; - -+static size_t remap_pairs; -+static char **remap_src; -+static char **remap_dst; -+ -+void -+add_cpp_remap_path (const char *arg) -+{ -+ const char *arg_dst; -+ size_t len; -+ -+ arg_dst = strchr(arg, ':'); -+ if (arg_dst == NULL) -+ { -+ fprintf(stderr, "Invalid argument for -iremap\n"); -+ exit(1); -+ } -+ -+ len = arg_dst - arg; -+ ++arg_dst; -+ -+ remap_src = (char **) xrealloc(remap_src, sizeof(char *) * (remap_pairs + 1)); -+ remap_dst = (char **) xrealloc(remap_dst, sizeof(char *) * (remap_pairs + 1)); -+ -+ remap_src[remap_pairs] = (char *) xmalloc(len + 1); -+ memcpy(remap_src[remap_pairs], arg, len); -+ remap_src[remap_pairs][len] = '\0'; -+ remap_dst[remap_pairs] = xstrdup(arg_dst); -+ ++remap_pairs; -+} -+ -+static const char * -+cpp_remap_file (const char *arg, char **tmp_name) -+{ -+ char *result; -+ size_t i, len; -+ -+ for (i = 0; i < remap_pairs; ++i) -+ { -+ len = strlen (remap_src[i]); -+ if (strncmp (remap_src[i], arg, len)) -+ continue; -+ if (arg[len] == '\0') -+ return xstrdup (remap_dst[i]); -+ if (arg[len] != '/') -+ continue; -+ arg += len; -+ len = strlen (remap_dst[i]); -+ result = (char *) xmalloc (len + strlen (arg) + 1); -+ memcpy(result, remap_dst[i], len); -+ strcpy(result + len, arg); -+ *tmp_name = result; -+ -+ return result; -+ } -+ -+ return arg; -+} -+ - /* Helper function for builtin_macro. Returns the text generated by - a builtin macro. */ - const uchar * -@@ -286,6 +344,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - { - unsigned int len; - const char *name; -+ char *tmp_name = NULL; - uchar *buf; - - if (node->value.builtin == BT_FILE) -@@ -297,6 +356,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - if (!name) - abort (); - } -+ name = cpp_remap_file (name, &tmp_name); - len = strlen (name); - buf = _cpp_unaligned_alloc (pfile, len * 2 + 3); - result = buf; -@@ -304,6 +364,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi - buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len); - *buf++ = '"'; - *buf = '\0'; -+ free (tmp_name); - } - break; - diff --git a/toolchain/gcc/patches/5.5.0/960-go_libm.patch b/toolchain/gcc/patches/5.5.0/960-go_libm.patch deleted file mode 100644 index d16b0200c0..0000000000 --- a/toolchain/gcc/patches/5.5.0/960-go_libm.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/go/Make-lang.in -+++ b/gcc/go/Make-lang.in -@@ -74,7 +74,7 @@ go_OBJS = $(GO_OBJS) go/gospec.o - - go1$(exeext): $(GO_OBJS) attribs.o $(BACKEND) $(LIBDEPS) - +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ -- $(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS) -+ $(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS) -lm - - # Documentation. - diff --git a/toolchain/gcc/patches/5.5.0/970-warn_bug.patch b/toolchain/gcc/patches/5.5.0/970-warn_bug.patch deleted file mode 100644 index 2c5cf9be20..0000000000 --- a/toolchain/gcc/patches/5.5.0/970-warn_bug.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgo/runtime/mprof.goc -+++ b/libgo/runtime/mprof.goc -@@ -403,7 +403,7 @@ func ThreadCreateProfile(p Slice) (n int - - func Stack(b Slice, all bool) (n int) { - byte *pc, *sp; -- bool enablegc; -+ bool enablegc = false; /* workaround GCC bug #36550 */ - - sp = runtime_getcallersp(&b); - pc = (byte*)(uintptr)runtime_getcallerpc(&b); diff --git a/tools/cmake/Makefile b/tools/cmake/Makefile index 05615fe740..64164fdd1d 100644 --- a/tools/cmake/Makefile +++ b/tools/cmake/Makefile @@ -7,14 +7,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cmake -PKG_VERSION:=3.18.5 +PKG_VERSION:=3.19.1 PKG_RELEASE:=1 PKG_CPE_ID:=cpe:/a:kitware:cmake PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/Kitware/CMake/releases/download/v$(PKG_VERSION)/ \ - https://cmake.org/files/v3.18/ -PKG_HASH:=080bf24b0f73f4bf3ec368d2be1aa59369b9bb1cd693deeb6f18fe553ca74ab4 + https://cmake.org/files/v3.19/ +PKG_HASH:=1d266ea3a76ef650cdcf16c782a317cb4a7aa461617ee941e389cb48738a3aba HOST_BUILD_PARALLEL:=1 HOST_CONFIGURE_PARALLEL:=1 diff --git a/tools/cmake/patches/120-curl-fix-libressl-linking.patch b/tools/cmake/patches/120-curl-fix-libressl-linking.patch index 4fb541f3e4..1095a4f8ac 100644 --- a/tools/cmake/patches/120-curl-fix-libressl-linking.patch +++ b/tools/cmake/patches/120-curl-fix-libressl-linking.patch @@ -20,7 +20,7 @@ Signed-off-by: Jo-Philipp Wich --- --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt -@@ -488,6 +488,14 @@ if(CMAKE_USE_OPENSSL) +@@ -508,6 +508,14 @@ if(CMAKE_USE_OPENSSL) endif() set(SSL_ENABLED ON) set(USE_OPENSSL ON) diff --git a/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch b/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch index c05ca4554e..512765c5af 100644 --- a/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch +++ b/tools/cmake/patches/130-bootstrap_parallel_make_flag.patch @@ -1,6 +1,6 @@ --- a/bootstrap +++ b/bootstrap -@@ -1297,7 +1297,10 @@ int main(){ printf("1%c", (char)0x0a); r +@@ -1397,7 +1397,10 @@ int main(){ printf("1%c", (char)0x0a); r ' > "test.c" cmake_original_make_flags="${cmake_make_flags}" if test "x${cmake_parallel_make}" != "x"; then diff --git a/tools/libressl/Makefile b/tools/libressl/Makefile index 0cc26a930c..dbd8ca4d1a 100644 --- a/tools/libressl/Makefile +++ b/tools/libressl/Makefile @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libressl -PKG_VERSION:=3.2.1 -PKG_HASH:=d28db224cfb6d18009b2a7e8cb213cd5c943bbec87550062fef6a38479250315 +PKG_VERSION:=3.3.1 +PKG_HASH:=a6d331865e0164a13ac85a228e52517f7cf8f8488f2f95f34e7857302f97cfdb PKG_RELEASE:=1 PKG_CPE_ID:=cpe:/a:openbsd:libressl