xiaoxiang781216 commented on code in PR #19510: URL: https://github.com/apache/nuttx/pull/19510#discussion_r3644399990
########## arch/arm/src/common/Toolchain.defs: ########## @@ -584,7 +584,28 @@ CELFFLAGS = $(CFLAGS) -fvisibility=hidden -mlong-calls # --target1-abs CXXELFFLAGS = $(CXXFLAGS)-fvisibility=hidden -mlong-calls ifeq ($(CONFIG_PIC),y) - CFLAGS += --fixed-r10 + # This has to go in ARCHCFLAGS rather than CFLAGS. Nearly every board + # Make.defs includes this file and then assigns Review Comment: remove the comment which doesn't exist after fix ########## boards/arm/tlsr82/tlsr8278adk80d/scripts/Make.defs: ########## @@ -31,14 +31,12 @@ else endif ARCHCFLAGS += -DMCU_CORE_B87=1 -fms-extensions -std=gnu99 -ARCHPICFLAGS += -fpic +ARCHPICFLAGS = -fpic Review Comment: remove directly ########## Documentation/components/nxflat.rst: ########## @@ -286,7 +286,8 @@ CFLAGS must be provided. First, the option ``-fpic`` is required to tell the compiler to generate position independent code (other GCC options, like ``-fno-jump-tables`` might also be desirable). For ARM compilers, two additional compilation options are required: ``-msingle-pic-base`` -and ``-mpic-register=r10``. +and ``-mpic-register=r10``. On ARM these are supplied centrally rather Review Comment: let's squash the patch into one -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
