Skip to content

Commit

Permalink
linux-beagleboard-3.8: Make it compile with gcc-5
Browse files Browse the repository at this point in the history
This set completes the build/compile successfully for bbb

Signed-off-by: Khem Raj <raj.khem@gmail.com>
  • Loading branch information
kraj committed Apr 30, 2015
1 parent 9dc444f commit 765e7f3
Show file tree
Hide file tree
Showing 4 changed files with 204 additions and 0 deletions.
@@ -0,0 +1,36 @@
From 74196d452a593f9aab375dd4887dac0fdca519e8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 30 Apr 2015 01:47:00 -0700
Subject: [PATCH] Fix extern inline use for gcc > 4.3 in c99 mode

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
lib/mpi/mpi-inline.h | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/lib/mpi/mpi-inline.h b/lib/mpi/mpi-inline.h
index e2b3985..541e83a 100644
--- a/lib/mpi/mpi-inline.h
+++ b/lib/mpi/mpi-inline.h
@@ -29,8 +29,17 @@
#ifndef G10_MPI_INLINE_H
#define G10_MPI_INLINE_H

+/* Starting with gcc 4.3 "extern inline" conforms in c99 mode to the
+ * c99 semantics. To keep the useful old semantics we use an
+ * attribute.
+ */
+
#ifndef G10_MPI_INLINE_DECL
-#define G10_MPI_INLINE_DECL extern inline
+#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
+#define G10_MPI_INLINE_DECL extern inline __attribute__ ((__gnu_inline__))
+#else
+#define G10_MPI_INLINE_DECL extern inline
+#endif
#endif

G10_MPI_INLINE_DECL mpi_limb_t
--
2.1.4

@@ -0,0 +1,35 @@
From 5f0bcc70b396437745fada3406853df3d35039d3 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 26 Apr 2015 17:55:58 +0000
Subject: [PATCH] Input: sentelic - use "static inline" instead of "inline"

gcc-5 defaults to gnu11 which used c99 inline semantics
in c99 'inline' is not externally visible unlike gnu89, therefore
we use 'static inline' which has same semantics between gnu89 and c99

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
drivers/input/mouse/sentelic.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/mouse/sentelic.h b/drivers/input/mouse/sentelic.h
index aa697ec..42df9e3 100644
--- a/drivers/input/mouse/sentelic.h
+++ b/drivers/input/mouse/sentelic.h
@@ -123,11 +123,11 @@ struct fsp_data {
extern int fsp_detect(struct psmouse *psmouse, bool set_properties);
extern int fsp_init(struct psmouse *psmouse);
#else
-inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
+static inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
{
return -ENOSYS;
}
-inline int fsp_init(struct psmouse *psmouse)
+static inline int fsp_init(struct psmouse *psmouse)
{
return -ENOSYS;
}
--
2.1.4

@@ -0,0 +1,130 @@
From 2c4b2980ae16a2d8d35f126ddb9fbcba809e2612 Mon Sep 17 00:00:00 2001
From: Vatika Harlalka <vatikaharlalka@gmail.com>
Date: Thu, 19 Mar 2015 13:25:20 +0530
Subject: [PATCH] Staging: rtl8188eu: Remove extern as it is defined but never
used

RTW_WPA_VERSION is removed as is declared and defined but
never used in the code.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 1 -
drivers/staging/rtl8188eu/include/ieee80211.h | 1 -
2 files changed, 2 deletions(-)

Index: kernel-source/drivers/net/wireless/rtl8192cu/core/rtw_ieee80211.c
===================================================================
--- kernel-source.orig/drivers/net/wireless/rtl8192cu/core/rtw_ieee80211.c
+++ kernel-source/drivers/net/wireless/rtl8192cu/core/rtw_ieee80211.c
@@ -26,7 +26,6 @@
#include <wlan_bssdef.h>

u8 RTW_WPA_OUI_TYPE[] = { 0x00, 0x50, 0xf2, 1 };
-u16 RTW_WPA_VERSION = 1;
u8 WPA_AUTH_KEY_MGMT_NONE[] = { 0x00, 0x50, 0xf2, 0 };
u8 WPA_AUTH_KEY_MGMT_UNSPEC_802_1X[] = { 0x00, 0x50, 0xf2, 1 };
u8 WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X[] = { 0x00, 0x50, 0xf2, 2 };
Index: kernel-source/drivers/net/wireless/rtl8192cu/include/ieee80211.h
===================================================================
--- kernel-source.orig/drivers/net/wireless/rtl8192cu/include/ieee80211.h
+++ kernel-source/drivers/net/wireless/rtl8192cu/include/ieee80211.h
@@ -137,7 +137,6 @@ enum {

#define WPA_SELECTOR_LEN 4
extern u8 RTW_WPA_OUI_TYPE[] ;
-extern u16 RTW_WPA_VERSION ;
extern u8 WPA_AUTH_KEY_MGMT_NONE[];
extern u8 WPA_AUTH_KEY_MGMT_UNSPEC_802_1X[];
extern u8 WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X[];
@@ -1194,18 +1193,18 @@ enum ieee80211_state {
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
(((Addr[5]) & 0xff) == 0xff))
#else
-extern __inline int is_multicast_mac_addr(const u8 *addr)
+static inline int is_multicast_mac_addr(const u8 *addr)
{
return ((addr[0] != 0xff) && (0x01 & addr[0]));
}

-extern __inline int is_broadcast_mac_addr(const u8 *addr)
+static inline int is_broadcast_mac_addr(const u8 *addr)
{
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
}

-extern __inline int is_zero_mac_addr(const u8 *addr)
+static inline int is_zero_mac_addr(const u8 *addr)
{
return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));
Index: kernel-source/drivers/staging/rtl8192u/ieee80211/ieee80211.h
===================================================================
--- kernel-source.orig/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ kernel-source/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -2254,7 +2254,7 @@ static inline void *ieee80211_priv(struc
return ((struct ieee80211_device *)netdev_priv(dev))->priv;
}

-extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
+static inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
{
/* Single white space is for Linksys APs */
if (essid_len == 1 && essid[0] == ' ')
@@ -2270,7 +2270,7 @@ extern inline int ieee80211_is_empty_ess
return 1;
}

-extern inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mode)
+static inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mode)
{
/*
* It is possible for both access points and our device to support
@@ -2296,7 +2296,7 @@ extern inline int ieee80211_is_valid_mod
return 0;
}

-extern inline int ieee80211_get_hdrlen(u16 fc)
+static inline int ieee80211_get_hdrlen(u16 fc)
{
int hdrlen = IEEE80211_3ADDR_LEN;

@@ -2582,12 +2582,12 @@ void ieee80211_softmac_scan_syncro(struc

extern const long ieee80211_wlan_frequencies[];

-extern inline void ieee80211_increment_scans(struct ieee80211_device *ieee)
+static inline void ieee80211_increment_scans(struct ieee80211_device *ieee)
{
ieee->scans++;
}

-extern inline int ieee80211_get_scans(struct ieee80211_device *ieee)
+static inline int ieee80211_get_scans(struct ieee80211_device *ieee)
{
return ieee->scans;
}
Index: kernel-source/drivers/staging/rtl8712/ieee80211.h
===================================================================
--- kernel-source.orig/drivers/staging/rtl8712/ieee80211.h
+++ kernel-source/drivers/staging/rtl8712/ieee80211.h
@@ -734,7 +734,7 @@ enum ieee80211_state {
#define IEEE_G (1<<2)
#define IEEE_MODE_MASK (IEEE_A|IEEE_B|IEEE_G)

-extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
+static inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
{
/* Single white space is for Linksys APs */
if (essid_len == 1 && essid[0] == ' ')
@@ -748,7 +748,7 @@ extern inline int ieee80211_is_empty_ess
return 1;
}

-extern inline int ieee80211_get_hdrlen(u16 fc)
+static inline int ieee80211_get_hdrlen(u16 fc)
{
int hdrlen = 24;

3 changes: 3 additions & 0 deletions common-bsp/recipes-kernel/linux/linux-beagleboard_3.8.bb
Expand Up @@ -41,6 +41,9 @@ SRC_URI += " \
file://0001-kernel-add-support-for-gcc-5.patch \
file://0001-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch \
file://0001-Input-lifebook-use-static-inline-instead-of-inline-i.patch \
file://0001-Input-sentelic-use-static-inline-instead-of-inline.patch \
file://0001-Staging-rtl8188eu-Remove-extern-as-it-is-defined-but.patch \
file://0001-Fix-extern-inline-use-for-gcc-4.3-in-c99-mode.patch \
file://defconfig \
file://am335x-pm-firmware.bin \
file://logo_linux_clut224.ppm \
Expand Down

0 comments on commit 765e7f3

Please sign in to comment.