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

Suggestion: add $(DEPENDENCIES) when building gcc/g++ #3

Open
ilg-ul opened this issue Jul 2, 2011 · 2 comments
Open

Suggestion: add $(DEPENDENCIES) when building gcc/g++ #3

ilg-ul opened this issue Jul 2, 2011 · 2 comments

Comments

@ilg-ul
Copy link

ilg-ul commented Jul 2, 2011

In order to accommodate different location for the dependencies (for personal reasons I prefer to completely isolate Homebrew from the rest of the system, so I installed it in /brew/local instead of /usr/local), I added the following definition to the Makefile

DEPENDENCY_DIR = /usr/local

DEPENDENCY_DIR = /brew/local
DEPENDENCIES = --with-mpc=$(DEPENDENCY_DIR) --with-mpfr=$(DEPENDENCY_DIR) --with-gmp=$(DEPENDENCY_DIR)

and when building gcc I used

../../gcc-$(GCC_VERSION)/configure --prefix=$(PREFIX)       \
--target=$(TARGET) $(DEPENDENCIES) --enable-languages="c" --with-gnu-ld     \
...

(similarly for g++).

It would be useful to have something like this included in the Makefile, to simplify customisation when using different environments. (same for the ARM build)

Thank you,

Liviu

@ilg-ul
Copy link
Author

ilg-ul commented Jul 3, 2011

As in the post about PREFIX, it is not needed to edit the Makefile to update the definition of DEPENDENCIES, it can be inherited from the environment.

I completely removed them from the Makefile and used the following before calling make:

# Define extra dependencies, in case they are not in the system path 
DEPENDENCY_DIR=/brew/local
export DEPENDENCIES="--with-mpc=$DEPENDENCY_DIR --with-mpfr=$DEPENDENCY_DIR --with-gmp=$DEPENDENCY_DIR"

Liviu

@kblomqvist
Copy link
Contributor

Exporting DEPENDENCIES is more elegant than changing the Makefile. I like 👍 A mention about this in the README file and the issue could be closed.

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