diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-07-23 23:55:19 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-07-25 18:05:13 -0400 |
commit | 5a02572001d1d903bdb36c13396efe73f3835a67 (patch) | |
tree | 981133adcc350579194ac9ad95545ce2dcaae2d5 /lib/stm32f4 | |
parent | a31a6c1d6a6e0f7d8c247799b373bf959c7e0584 (diff) | |
download | kutter-5a02572001d1d903bdb36c13396efe73f3835a67.tar.gz kutter-5a02572001d1d903bdb36c13396efe73f3835a67.tar.xz kutter-5a02572001d1d903bdb36c13396efe73f3835a67.zip |
lib: Update stm32f4 code to support gcc -fwhole-program
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'lib/stm32f4')
-rw-r--r-- | lib/stm32f4/stm32f4.patch | 13 | ||||
-rw-r--r-- | lib/stm32f4/system_stm32f4xx.c | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/stm32f4/stm32f4.patch b/lib/stm32f4/stm32f4.patch new file mode 100644 index 00000000..4f5d88c3 --- /dev/null +++ b/lib/stm32f4/stm32f4.patch @@ -0,0 +1,13 @@ +diff --git a/lib/stm32f4/system_stm32f4xx.c b/lib/stm32f4/system_stm32f4xx.c +index 11c18d1a..b94cfb2f 100644 +--- a/lib/stm32f4/system_stm32f4xx.c ++++ b/lib/stm32f4/system_stm32f4xx.c +@@ -163,7 +163,7 @@ const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4}; + * @param None
+ * @retval None
+ */
+-void SystemInit(void)
++void __attribute__((externally_visible)) SystemInit(void)
+ {
+ /* FPU settings ------------------------------------------------------------*/
+ #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
diff --git a/lib/stm32f4/system_stm32f4xx.c b/lib/stm32f4/system_stm32f4xx.c index 11c18d1a..b94cfb2f 100644 --- a/lib/stm32f4/system_stm32f4xx.c +++ b/lib/stm32f4/system_stm32f4xx.c @@ -163,7 +163,7 @@ const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4}; * @param None
* @retval None
*/
-void SystemInit(void)
+void __attribute__((externally_visible)) SystemInit(void)
{
/* FPU settings ------------------------------------------------------------*/
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
|