forked from Imagelibrary/rtems
pc386: Fix linker usage issues with -r and function sections
closes #2638.
This commit is contained in:
@@ -201,6 +201,7 @@ noinst_PROGRAMS += ne2000.rel
|
||||
ne2000_rel_SOURCES = ne2000/ne2000.c
|
||||
ne2000_rel_CPPFLAGS = $(AM_CPPFLAGS) $(ne2000_CPPFLAGS)
|
||||
ne2000_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
ne2000_rel_LDFLAGS += -Wl,--undefined=rtems_ne_driver_attach
|
||||
endif
|
||||
|
||||
if HAS_NETWORKING
|
||||
@@ -214,6 +215,7 @@ wd8003_rel_SOURCES = wd8003/wd8003.c
|
||||
wd8003_rel_SOURCES += include/wd80x3.h
|
||||
wd8003_rel_CPPFLAGS = $(AM_CPPFLAGS) $(wd8003_CPPFLAGS)
|
||||
wd8003_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
wd8003_rel_LDFLAGS += -Wl,--undefined=rtems_wd_driver_attach
|
||||
endif
|
||||
|
||||
if HAS_NETWORKING
|
||||
@@ -225,6 +227,8 @@ noinst_PROGRAMS += 3c509.rel
|
||||
3c509_rel_SOURCES += 3c509/elink.h
|
||||
3c509_rel_CPPFLAGS = $(AM_CPPFLAGS) $(3c509_CPPFLAGS)
|
||||
3c509_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
3c509_rel_LDFLAGS += -Wl,--undefined=rtems_3c509_driver_attach
|
||||
3c509_rel_LDFLAGS += -Wl,--undefined=ep_board
|
||||
endif
|
||||
|
||||
libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/cache.rel
|
||||
|
||||
@@ -20,9 +20,9 @@ endif
|
||||
# optimize flag: typically -O2
|
||||
CFLAGS_OPTIMIZE_V = -O2 -g
|
||||
# Per function sections disabled per https://devel.rtems.org/ticket/2638
|
||||
# CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
|
||||
#
|
||||
# LDFLAGS = -Wl,--gc-sections
|
||||
CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections
|
||||
|
||||
LDFLAGS = -Wl,--gc-sections
|
||||
|
||||
# Here is the rule to actually build a $(ARCH)/foo$(EXEEXT)
|
||||
# It also builds $(ARCH)/foo.sr and $(ARCH)/foo.nm
|
||||
|
||||
Reference in New Issue
Block a user