patacongo commented on issue #3737: URL: https://github.com/apache/incubator-nuttx/issues/3737#issuecomment-842679209
There is a workaround for this problem noted here: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=139630111 . The workaround is to use an newer GCC option |-mno-pic-data-is-text-relative. ||T|hat option restores the original behavior of the older GCC tools. The README file should be updated to reflect this workaround. This issue (but not the workaround) is discussed in https://cwiki.apache.org/confluence/display/NUTTX/NxFlat as well. On 5/17/2021 3:43 PM, a-lunev wrote: > > Hello, > Unfortunately, I can not build eagle100:nxflat and eagle100:thttpd > configurations. > As I've understood from README files and history files in NuttX repo, > there are some not yet resolved issues with new gcc versions, and gcc > 4.3.3 was the last version that still worked for NXFLAT mode. > I tried to build NXFLAT Toolchain based on gcc 4.3.3 and binutils > 2.19.1, however I'm still experiencing NuttX build errors. > > Steps to reproduce: > > |$ mkdir TEST_ROOT $ git clone > https://github.com/apache/incubator-nuttx.git TEST_ROOT/nuttx $ git > clone https://github.com/apache/incubator-nuttx-apps TEST_ROOT/apps $ > cd TEST_ROOT/nuttx $ ./tools/configure.sh -l eagle100:nxflat | > > Build NXFLAT Toolchain: > > |$ git clone https://bitbucket.org/nuttx/buildroot.git > TEST_ROOT/buildroot/buildroot $ cd TEST_ROOT/buildroot/buildroot $ cp > configs/cortexm3-defconfig-nxflat .config $ make oldconfig $ make > menuconfig activate the following options: Toolchain Options -> Build > GCC cross-compiler Toolchain Options -> Build C++ compiler $ make | > > Build NuttX: > > |$ cd TEST_ROOT/nuttx $ make > CROSSDEV=TEST_ROOT/buildroot/buildroot/build_arm_nofpu/staging_dir/bin/arm-nuttx-elf- > \ > MKNXFLAT=TEST_ROOT/buildroot/buildroot/build_arm_nofpu/staging_dir/bin/mknxflat > \ > LDNXFLAT=TEST_ROOT/buildroot/buildroot/build_arm_nofpu/staging_dir/bin/ldnxflat > | > > There are multiple build errors. The first portion is as follows: > > |make[5]: Entering directory > '.../TEST_ROOT/apps/examples/nxflat/tests/errno' CC: errno.c LD: > errno.o MK: errno.r1 AS: errno-thunk.S LD: errno-thunk.o LD: errno.r2 > INPUT SECTIONS: SECT LOW HIGH SIZE TEXT 00000000 0000018a 0000018a > DATA 00000000 00000028 00000028 BSS 00000028 00000028 00000000 ERROR > -- Symbol in GOT32 relocation is in TEXT ERROR -- At addr 00000064 to > sym '.LC0' [0000010c] ERROR -- Symbol in GOT32 relocation is in TEXT > ERROR -- At addr 00000068 to sym '.LC1' [00000124] ERROR -- Symbol in > GOT32 relocation is in TEXT ERROR -- At addr 0000006c to sym > 'g_nonexistent' [000000fc] ERROR -- Symbol in GOT32 relocation is in > TEXT ERROR -- At addr 00000070 to sym '.LC2' [0000013c] ERROR -- > Symbol in GOT32 relocation is in TEXT ERROR -- At addr 00000074 to sym > '.LC3' [0000013e] ERROR -- Symbol in GOT32 relocation is in TEXT ERROR > -- At addr 00000078 to sym '.LC4' [00000165] Entry symbol "main": > 00000024 in section ".text" | > > Could you please tell me if I'm doing something wrong or what > https://bitbucket.org/nuttx/buildroot.git > <https://bitbucket.org/nuttx/buildroot.git> SHA-1 (including what gcc > and binutils version) and NuttX SHA-1 are compatible to each other to > make NuttX with enabled NXFLAT working? > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <https://github.com/apache/incubator-nuttx/issues/3737>, or > unsubscribe > <https://github.com/notifications/unsubscribe-auth/ABFUG6R7R7Y7XDWVTR6M6O3TOGEXVANCNFSM45BIO7SQ>. > -- 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. For queries about this service, please contact Infrastructure at: [email protected]
