Skip to content

fix(nanodump): remove -static flag for macOS compatibility#144

Open
ROCKLEE-1998 wants to merge 1 commit into
Adaptix-Framework:devfrom
ROCKLEE-1998:fix/macos-build-static-linking
Open

fix(nanodump): remove -static flag for macOS compatibility#144
ROCKLEE-1998 wants to merge 1 commit into
Adaptix-Framework:devfrom
ROCKLEE-1998:fix/macos-build-static-linking

Conversation

@ROCKLEE-1998

Copy link
Copy Markdown

Summary

Fixes compilation error on macOS by removing -static linker flag from nanodump Makefile.

Problem

macOS does not support static linking of system libraries, which caused the following linker error:

ld: library 'crt0.o' not found
clang: error: linker command failed with exit code 1

Changes

  • Remove -static flag from bin2c compilation (line 26)
  • Remove -static flag from restore_signature compilation (line 78)
  • Remove incorrect mingw strip command for native binary (line 79)

Testing

Successfully compiled all 131 BOF modules on macOS 14.5 with:

  • mingw-w64 GCC 15.2.0
  • Apple clang version 15.0.0

Compatibility

This change maintains compatibility with Linux builds while enabling macOS compilation.

- Remove -static flag from bin2c compilation (line 26)
- Remove -static flag from restore_signature compilation (line 78)
- Remove incorrect mingw strip command for native binary (line 79)

macOS does not support static linking of system libraries, which caused
'library crt0.o not found' linker errors. This fix allows the project to
build successfully on macOS while maintaining compatibility with Linux.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

1 participant