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

win32/Makefile.gcc doesn't use CROSS_PREFIX nor PREFIX #180

Open
MrSparc opened this issue Dec 21, 2016 · 8 comments
Open

win32/Makefile.gcc doesn't use CROSS_PREFIX nor PREFIX #180

MrSparc opened this issue Dec 21, 2016 · 8 comments

Comments

@MrSparc
Copy link

MrSparc commented Dec 21, 2016

My host is Linux and I'm building a script for cross compiling for many target platforms (windows, linux-arm, android, ios, etc.).
So for cross compiling for Windows I'm using mingw, then I would like to set the compiler prefix like this:
CROSS_PREFIX="i586-pc-mingw32-"

But win32/Makefile.gcc doesn't use this at all (like ./configure does).
This makefile looks is prepared to use instead the PREFIX var, but includes a line that make impossible to set the var before makefile being invoked:
PREFIX =

I can patch the win32/Makefile.gcc to remove this line but this should be fixed.

@mtl1979
Copy link

mtl1979 commented Jan 4, 2017

MinGW support in stock zlib is at pretty early stage... using win32/Makefile.gcc was a temporary workaround until configure gets full support for MinGW... There is at least three main variations of MinGW using either MSYS or MSYS2 and that makes adding the support to configure pretty complicated.

@jcadduono
Copy link

I had a similar issue and came up with this #220
You might be able to do...
HOST=i586-pc-mingw32 make -fwin32/Makefile.mingw-w64

@mtl1979
Copy link

mtl1979 commented Sep 7, 2017

@timofonic zlib-ng also has quite long inactive periods. Makes no sense to advertise it on every possible issue on this project.

@jeking3
Copy link

jeking3 commented Nov 23, 2017

If CMake with the -DCMAKE_INSTALL_PREFIX=

worked sufficiently would that be a reasonable solution instead?

@mtl1979
Copy link

mtl1979 commented Nov 23, 2017

@jeking3 Apples and Oranges, FYI... Has nothing to do with cmake.

@jeking3
Copy link

jeking3 commented Nov 23, 2017

@mtl1979 I am suggesting that static check-in makefiles or project files are not easily maintainable across multiple platforms when a project changes, and that using cmake across the board would solve this problem. If one always generates a project or makefile or whatnot, it will always be provably correct through CI.

@mtl1979
Copy link

mtl1979 commented Nov 23, 2017

@jeking3 cmake has its own problems which are way worse than configure and GNU make together

@Neustradamus
Copy link

Neustradamus commented Jan 19, 2024

@ all : Can you try the current devel branch?
What are your results?

Thanks in advance.

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

6 participants
@Neustradamus @MrSparc @jeking3 @mtl1979 @jcadduono and others