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

Variables in options.mk not set when included in tool Makefiles #537

Open
MulattoKid opened this issue Jan 13, 2025 · 0 comments
Open

Variables in options.mk not set when included in tool Makefiles #537

MulattoKid opened this issue Jan 13, 2025 · 0 comments
Assignees

Comments

@MulattoKid
Copy link

Hi,

We've seen an issue where one of our developers is attempting to build wolfBoot in a Docker container built for a aarch64 host. When doing so the build fails (specifically for the bin-assemble tool) with the stabs debug format not being supported. We did some digging, and found that it's due to this check in options.mk:

# allow elf inclusion of debug symbols even with optimizations enabled
# make DEBUG_SYMBOLS=1
ifeq ($(DEBUG_SYMBOLS),1)
  CFLAGS+=-g
  ifeq ($(USE_GCC),1)
    CFLAGS+=-ggdb3
  else
    CFLAGS+=-gstabs
  endif
endif

When compiling the actual bootloader this works fine as this line is at the top of the Makefile: USE_GCC?=1. However, when compiling the tools the options.mk file is included without USE_GCC being set to 1.

Is there a reason the stabs format is used specifically, or could it be replaced by -g, to use the default format on the host platform? Or should USE_GCC be set to 1, because the Makefile explicitly uses GCC.
Just to note that this works fine in Docker containers built for a amd64 host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants