• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/boot/afboot-stm32/0001-Use-ld-instead-of-gcc-for-linking.patch
Thomas PetazzoniThomas Petazzoni committed a354e3828db15 Apr 2016
Raw file
Source viewDiff to previous
 
1
From 0d581abe6620ac69adec321b94390e009802f36a Mon Sep 17 00:00:00 2001
2
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3
Date: Sun, 13 Mar 2016 14:32:33 +0100
4
Subject: [PATCH] Use ld instead of gcc for linking
5
​
6
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7
---
8
 Makefile | 11 ++++++-----
9
 1 file changed, 6 insertions(+), 5 deletions(-)
10
​
11
diff --git a/Makefile b/Makefile
12
index ce40314..271bb4f 100644
13
--- a/Makefile
14
+++ b/Makefile
15
@@ -1,6 +1,7 @@
16
 CROSS_COMPILE ?= arm-none-eabi-
17
 
18
 CC = $(CROSS_COMPILE)gcc
19
+LD = $(CROSS_COMPILE)ld
20
 OBJCOPY = $(CROSS_COMPILE)objcopy
21
 OBJDUMP = $(CROSS_COMPILE)objdump
22
 SIZE = $(CROSS_COMPILE)size
23
@@ -10,7 +11,7 @@ OPENOCD = openocd
24
 CFLAGS := -mthumb -mcpu=cortex-m4
25
 CFLAGS += -ffunction-sections -fdata-sections
26
 CFLAGS += -Os -std=gnu99 -Wall
27
-LDFLAGS := -nostartfiles -Wl,--gc-sections
28
+LINKERFLAGS := -nostartfiles --gc-sections
29
 
30
 obj-y += gpio.o mpu.o
31
 obj-f4 += $(obj-y) usart-f4.o
32
@@ -22,22 +23,22 @@ all: stm32f429i-disco stm32429i-eval stm32f469i-disco stm32746g-eval
33
    $(CC) -c $(CFLAGS) $< -o $@
34
 
35
 stm32f429i-disco: stm32f429i-disco.o $(obj-f4)
36
-   $(CC) -T stm32f429.lds $(LDFLAGS) -o stm32f429i-disco.elf stm32f429i-disco.o $(obj-f4)
37
+   $(LD) -T stm32f429.lds $(LINKERFLAGS) -o stm32f429i-disco.elf stm32f429i-disco.o $(obj-f4)
38
    $(OBJCOPY) -Obinary stm32f429i-disco.elf stm32f429i-disco.bin
39
    $(SIZE) stm32f429i-disco.elf
40
 
41
 stm32429i-eval: stm32429i-eval.o $(obj-f4)
42
-   $(CC) -T stm32f429.lds $(LDFLAGS) -o stm32429i-eval.elf stm32429i-eval.o $(obj-f4)
43
+   $(LD) -T stm32f429.lds $(LINKERFLAGS) -o stm32429i-eval.elf stm32429i-eval.o $(obj-f4)
44
    $(OBJCOPY) -Obinary stm32429i-eval.elf stm32429i-eval.bin
45
    $(SIZE) stm32429i-eval.elf
46
 
47
 stm32f469i-disco: stm32f469i-disco.o $(obj-f4)
48
-   $(CC) -T stm32f429.lds $(LDFLAGS) -o stm32f469i-disco.elf stm32f469i-disco.o $(obj-f4)
49
+   $(LD) -T stm32f429.lds $(LINKERFLAGS) -o stm32f469i-disco.elf stm32f469i-disco.o $(obj-f4)
50
    $(OBJCOPY) -Obinary stm32f469i-disco.elf stm32f469i-disco.bin
51
    $(SIZE) stm32f469i-disco.elf
52
 
53
 stm32746g-eval: stm32746g-eval.o $(obj-f7)
54
-   $(CC) -T stm32f429.lds $(LDFLAGS) -o stm32746g-eval.elf stm32746g-eval.o $(obj-f7)
55
+   $(LD) -T stm32f429.lds $(LINKERFLAGS) -o stm32746g-eval.elf stm32746g-eval.o $(obj-f7)
56
    $(OBJCOPY) -Obinary stm32746g-eval.elf stm32746g-eval.bin
57
    $(SIZE) stm32746g-eval.elf
58
 
59
-- 
60
2.6.4
61
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.