Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] duplicate CFLAGS in linking when Cmake and ninja backend building #14426

Open
1 task done
jinliangli opened this issue Oct 21, 2024 · 0 comments
Open
1 task done
Labels
Arch: all Issues that apply to all architectures Area: Build system

Comments

@jinliangli
Copy link
Contributor

Description / Steps to reproduce the issue

Duplicate CFLAGS(e.g. -mcpu=cortex-a7) in linking like the below:

arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-g++ --specs=nosys.specs -Wl,--entry=__start -nostdlib -Wl,--gc-sections -Wl,--cref -Wl,-Map=nuttx.map CMakeFiles/nuttx.dir/empty.cxx.obj CMakeFiles/final_nuttx.dir/kasan_global_final.c.obj -o final_nuttx -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -fno-common -Wall -Wshadow -Wundef -nostdlib -Os -fno-strict-aliasing -fomit-frame-pointer -fsanitize=kernel-address --param=asan-globals=1 -ffunction-sections -fdata-sections -g -Wno-attributes -Wno-unknown-pragmas -Wstrict-prototypes -Wno-psabi -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -fno-common -Wall -Wshadow -Wundef -nostdlib -Os -fno-strict-aliasing -fomit-frame-pointer -fsanitize=kernel-address --param=asan-globals=1 -ffunction-sections -fdata-sections -g -Wno-attributes -Wno-unknown-pragmas -Wstrict-prototypes -Wno-psabi -fdiagnostics-color=always -T dramboot.ld.tmp -Wl,--start-group arch/libarch.a binfmt/libbinfmt.a drivers/libdrivers.a fs/libfs.a libs/libc/libc.a mm/libmm.a sched/libsched.a boards/libboard.a libs/libxx/liblibcxxmini.a apps/libapps.a apps/builtin/libapps_builtin.a apps/system/nsh/libapps_nsh.a apps/system/nsh/libapps_sh.a apps/testing/getprime/libapps_getprime.a apps/testing/kasantest/libapps_kasantest.a apps/testing/ostest/libapps_ostest.a apps/examples/hello/libapps_hello.a

Reproduce steps:

  1. cmake -B build -DBOARD_CONFIG=qemu-armv7a:nsh -GNinja
  2. cd build
  3. ninja -v

There is no such issue when Cmake and makefile backend building.

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

Ubuntu 20.04.6 LTS

NuttX Version

master

Issue Architecture

[Arch: all]

Issue Area

[Area: Build System]

Verification

  • I have verified before submitting the report.
@github-actions github-actions bot added Arch: all Issues that apply to all architectures Area: Build system labels Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: all Issues that apply to all architectures Area: Build system
Projects
None yet
Development

No branches or pull requests

1 participant