Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Nov 24, 2021

…friends.

This refactoring splits out get_libs_to_link into its own function
which can early return once the list is complete.

The follow gcc/clang flags are now (kind of) supported:

  • -nostartfiles - don't link crt1 and other startup files
  • -nolibc - don't link libc
  • -nodefualtlibs - don't link libc or compiler-rt or other stdlibs
    (but do link startup files)
  • -nostdlib - don't link any system libraries or startup files.

@sbc100 sbc100 force-pushed the refactor_system_libs branch 2 times, most recently from 6e10cb9 to 1ca5c7b Compare November 30, 2021 21:45
@sbc100 sbc100 requested a review from dschuff November 30, 2021 21:46
@dschuff
Copy link
Member

dschuff commented Nov 30, 2021

  • -nostartupfiles - don't link crt1 and other startup files

This should be nostartfiles

@sbc100 sbc100 force-pushed the refactor_system_libs branch from 1ca5c7b to fe8af5a Compare January 8, 2022 02:44
@sbc100 sbc100 enabled auto-merge (squash) January 8, 2022 02:45
…friends.

This refactoring splits out `get_libs_to_link` into its own function
which can early return once the list is complete.

The follow gcc/clang flags are now (kind of) supported:

- `-nostartfiles` - don't link crt1 and other startup files
- `-nolibc`       - don't link libc
- `-nodefualtlibs`- don't link libc or compiler-rt or other stdlibs
                    (but do link startup files)
- `-nostdlib`     - don't link any system libraries or startup files.
@sbc100 sbc100 force-pushed the refactor_system_libs branch from fe8af5a to 04f5d4c Compare January 8, 2022 02:55
@sbc100 sbc100 merged commit fd23b8c into main Jan 8, 2022
@sbc100 sbc100 deleted the refactor_system_libs branch January 8, 2022 12:27
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.

3 participants