Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use environment variables for tool paths instead of hardcoded#3

Open
snacsnoc wants to merge 3 commits into
eylon-44:mainfrom
snacsnoc:use-tools-env-vars
Open

Use environment variables for tool paths instead of hardcoded#3
snacsnoc wants to merge 3 commits into
eylon-44:mainfrom
snacsnoc:use-tools-env-vars

Conversation

@snacsnoc
Copy link
Copy Markdown

@snacsnoc snacsnoc commented Jun 13, 2024

This PR refactors the Makefiles to replace hardcoded definitions of the compiler (gcc), linker (ld), archiver (ar), and ranlib (ranlib) with conditional assignments. This change allows users to override these tools via environment variables:

make CC=i686-elf-gcc AR=i686-elf-ar RANLIB=i686-elf-ranlib LD=i686-elf-ld

Out of the box, Buzz OS was not buildable for me (gcc defaults to clang on Mac OS for example). Since I'm on arm64, I had to use a cross compiler.

  1. Also in this PR is using the user's home directory instead of /home/eylon/
  2. This may have been a separate PR, but makefile now creates USR_FILES_DIR(usr/file) by default when building the filesystem image. Previously, the build would fail when this directory didn't exist.

It appears you prefer to use curly brackets {} for variable assignments instead of regular parenthesis so I tried to keep the same style.

@eylon-44 eylon-44 force-pushed the main branch 3 times, most recently from aa6dd80 to c7ecd82 Compare June 29, 2024 12:11
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