Rakefile: change library order for libm to be used correctly
This commit is contained in:
parent
409a4ffa4c
commit
de5d8d0d87
6
Rakefile
6
Rakefile
|
@ -54,7 +54,7 @@ cflags << "-fshort-enums"
|
||||||
# don't use system main definition (the starting point)
|
# don't use system main definition (the starting point)
|
||||||
cflags << "-ffreestanding"
|
cflags << "-ffreestanding"
|
||||||
# don't use the standard library (only if you provide an alternative libc library)
|
# don't use the standard library (only if you provide an alternative libc library)
|
||||||
#cflags << "-nostdlib -nostdinc"
|
cflags << "-nostdlib -nostdinc"
|
||||||
# standard C library (use musl libc)
|
# standard C library (use musl libc)
|
||||||
cflags << "-I /usr/lib/musl/include/"
|
cflags << "-I /usr/lib/musl/include/"
|
||||||
# include own libraries
|
# include own libraries
|
||||||
|
@ -75,13 +75,13 @@ ldflags << "-nostartfiles"
|
||||||
# only keep used sections
|
# only keep used sections
|
||||||
ldflags << "--gc-sections"
|
ldflags << "--gc-sections"
|
||||||
# don't use system libraries (only if you provide an alternative libc library)
|
# don't use system libraries (only if you provide an alternative libc library)
|
||||||
#ldflags << "-nostdlib -nostdinc"
|
ldflags << "-nostdlib -nostdinc -nosys"
|
||||||
# add standard libraries (for libc, libm, libnosys, libgcc) and libopencm3
|
# add standard libraries (for libc, libm, libnosys, libgcc) and libopencm3
|
||||||
library_paths = ["/usr/arm-none-eabi/lib/armv7-m/", "/usr/lib/gcc/arm-none-eabi/*/armv7-m/", LIBOPENCM3_LIB]
|
library_paths = ["/usr/arm-none-eabi/lib/armv7-m/", "/usr/lib/gcc/arm-none-eabi/*/armv7-m/", LIBOPENCM3_LIB]
|
||||||
ldflags += library_paths.collect {|library_path| "--library-path #{library_path}"}
|
ldflags += library_paths.collect {|library_path| "--library-path #{library_path}"}
|
||||||
ldflags *= ' '
|
ldflags *= ' '
|
||||||
# used libraries (gcc provides the ARM ABI)
|
# used libraries (gcc provides the ARM ABI)
|
||||||
ldlibs = [STM32F1_LIB, "c", "m", "nosys", "gcc"]
|
ldlibs = [STM32F1_LIB, "m", "c", "nosys", "gcc"]
|
||||||
ldlibs = ldlibs.collect {|library| "--library #{library}"}
|
ldlibs = ldlibs.collect {|library| "--library #{library}"}
|
||||||
ldlibs *= ' '
|
ldlibs *= ' '
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue