Code Monkey home page Code Monkey logo

Comments (9)

mid-kid avatar mid-kid commented on May 30, 2024

Note that $CC and $CXX are supposed to point to the system's host compiler, not to a cross-compiler. As such, it makes sense to ignore them in that context. I assume you're talking about the tools makefiles, however?

from pokeemerald.

aaaaaa123456789 avatar aaaaaa123456789 commented on May 30, 2024

I'm talking about stuff built with the host compiler, yes. I'm not sure if that's just the tools' makefiles or if the main makefile invokes it too.

from pokeemerald.

PikalaxALT avatar PikalaxALT commented on May 30, 2024

Afaik it's just the tools. Main makefile doesn't care except in the devkitARM-free repositories which define CPP := $(CC) -E.

from pokeemerald.

PikalaxALT avatar PikalaxALT commented on May 30, 2024

On testing, this claim does not hold water. (Ignore the error, I don't have libpng for the mingw32 target in this environment.)

pokeemerald$ make tools CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++
i686-w64-mingw32-g++ -Wall -std=c++11 -O2 json11.cpp mapjson.cpp -o mapjson
i686-w64-mingw32-gcc -Wall -Wextra -Wno-switch -Werror -std=c11 -O2 main.c extended.c -o aif2pcm  -lm
i686-w64-mingw32-g++ -Wall -std=c++11 -O2 -I . jsonproc.cpp -o jsonproc
i686-w64-mingw32-g++ -std=c++11 -O2 -Wall -Wno-switch -Werror main.cpp sym_file.cpp elf.cpp -o ramscrgen
i686-w64-mingw32-g++ -Wall -Werror -std=c++11 -O2 scaninc.cpp c_file.cpp asm_file.cpp source_file.cpp -o scaninc
i686-w64-mingw32-gcc -Wall -Wextra -Werror -std=c11 -O2 bin2c.c -o bin2c
i686-w64-mingw32-gcc -Wall -Wextra -Werror -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK main.c convert_png.c util.c font.c -o rsfont  -lpng -lz
convert_png.c:5:10: fatal error: png.h: No such file or directory
 #include <png.h>
          ^~~~~~~
compilation terminated.
Makefile:12: recipe for target 'rsfont' failed
make[1]: *** [rsfont] Error 1
Makefile:138: recipe for target 'tools/rsfont' failed
make: *** [tools/rsfont] Error 2

from pokeemerald.

PikalaxALT avatar PikalaxALT commented on May 30, 2024

Edit: The issue is in the build_tools.sh script, which will soon be deprecated.

from pokeemerald.

aaaaaa123456789 avatar aaaaaa123456789 commented on May 30, 2024

Environment variables ≠ make variables.

Make variables: make FOO=BAR
Environment variables: FOO=BAR make

Environment variables can also be predefined (e.g., in the .bashrc file); the above example is equivalent to:

export FOO=BAR
make

from pokeemerald.

PikalaxALT avatar PikalaxALT commented on May 30, 2024

I see what you're saying. This is intentional to avoid the ARM compilers being passed to compile the tools.

from pokeemerald.

aaaaaa123456789 avatar aaaaaa123456789 commented on May 30, 2024

The ARM compilers should never be passed through those variables; those variables are intended for the host compilers. Anyone who has ARM compilers there (without having an ARM CPU) has a misconfiguration in their system.

from pokeemerald.

mid-kid avatar mid-kid commented on May 30, 2024

The ARM compilers should only be set in the root makefile, but never passed down through the environment to the tools.

from pokeemerald.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.