Package glew: Enable shared build & use original makefile. #350

Merged
merged 1 commit into from Mar 24, 2014

Projects

None yet

3 participants

@TobiX
Contributor
TobiX commented Mar 19, 2014

I made two different patches. I like this one better, it switches to using the upstream Makefile of glew.

There is another branch https://github.com/TobiX/mxe/tree/glew-shared, which only enables shared builds and doesn't change the build style (calls gcc and ld directly instead of using the upstream Makefile). Please select the one you like better or 🎱 ;)

Both use -O0 for shared builds, otherwise the resulting DLL does not work (don't know why) - see http://paste.debian.net/88601/ for a transcript with wine (For wine, this works with -O1, on Windows 7, it only works with -O0). I'll try to get behind this, but this seems to work for now...

@TimothyGu
Member

Both use -O0 for shared builds, otherwise the resulting DLL does not work

Did you try using our old home brew build script with optimization? Also it would be a good idea to talk to upstream about this.

@TobiX
Contributor
TobiX commented Mar 19, 2014

Did you try using our old home brew build script with optimization?

Yes, same problem.

Also it would be a good idea to talk to upstream about this.

Yes, I agree. Will do that.

@tonytheodore
Member

Looks good, could you rearrange the make invocation to something like:

    $(MAKE) -C '$(1)' \
        GLEW_DEST=$(PREFIX)/$(TARGET) \
        SYSTEM=linux-mingw32 \
        CC=$(TARGET)-gcc \
        LD=$(TARGET)-ld \
        NAME=GLEW \
        $(if $(BUILD_SHARED),POPT=-O0) \
        mxe glew.pc glewmx.pc
@TobiX TobiX Package glew: Enable shared build & use original makefile.
- Using the upstream makefile looks like the cleaner approch.
- Still needs minor patching of the pkg-config files.
- For shared builds, we use -O0 instead of -O2, otherwise the resulting
  DLL does not work...
d0752c5
@TobiX
Contributor
TobiX commented Mar 23, 2014

I updated the patch and reported the bug upstream: https://sourceforge.net/p/glew/bugs/245/

@TimothyGu
Member

Thanks! I think the patch should be OK to be merged now.

@tonytheodore
Member

Thanks!

@tonytheodore tonytheodore merged commit 6676fa2 into mxe:master Mar 24, 2014
@TobiX TobiX deleted the TobiX:glew-original-makefile branch Mar 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment