nasa / bplib

Apache License 2.0
27 stars 13 forks source link

It is customary to externally set `CC` to specify a cross compiler #36

Closed jphickey closed 4 years ago

jphickey commented 4 years ago

https://github.com/nasa/bplib/blob/17d228c27ed93e1f3bf8b93091afa0319e3a6e28/Makefile#L148-L149

Particularly when cross comiling, it is customary to externally set the CC environment variable to the path of the cross compiler. Furthermore GNU make will automatically set CC to a reasonable default so it is generally not necessary to set these explicitly in the Makefile.

jphickey commented 4 years ago

Also note that typically the O variable indicates the output (build dir), not optimization level.

jpswinski commented 4 years ago

The commit above also removed the O variable for optimization level and relies instead of just adding it to the COPT variable.