in reply to Re^2: perl 5.14.0-RC1 is available for testing!
in thread perl 5.14.0-RC1 is available for testing!

AHA, typical dumb makefile and I forgot to grep :)

That makefile is really really unreadable (someone should indent it, rewrite it)

I shouldn't need to know anything about this :) The GCC_4XX way should be automatic one way or another, something like

.IF "$(CCTYPE)" == "GCC" GCC_VERSION *= $(shell gcc -dumpversion) GCC_MAJOR_VERSION *= $(GCC_VERSION:b:b) .IF "$(GCC_MAJOR_VERSION)" == "4" GCC_4XX *= define .ENDIF .ENDIF
Or my way (untested)
.IF "$(CCTYPE)" == "GCC" GCC_VERSION *= $(shell gcc -dumpversion) GCC_MAJOR_VERSION *= $(GCC_VERSION:b:b) .IF "$(GCC_MAJOR_VERSION)" == "4" CFLAGS +=-static-libgcc LIBC += -static-libgcc .ENDIF .ENDIF
Checking my make commands, a test makefile.mk
CCTYPE *= GCC .IF "$(CCTYPE)" == "GCC" GCC_VERSION *= $(shell gcc -dumpversion) GCC_MAJOR_VERSION *= $(GCC_VERSION:b:b) .IF "$(GCC_MAJOR_VERSION)" == "4" CFLAGS += -static-libgcc LIBC += -static-libgcc GCC_4XX *= define .ENDIF .ENDIF __echo_GCC: @echo GCC_VERSION $(GCC_VERSION) @echo GCC_MAJOR_VERSION $(GCC_MAJOR_VERSION) @echo GCC_4XX $(GCC_4XX) @echo CFLAGS $(CFLAGS) @echo LIBC $(LIBC) $(NOOP)
how it runs (output)
$ dmake -f makefile.mk dmake: Executing shell macro: gcc -dumpversion dmake: Executing shell macro: gcc -dumpversion GCC_VERSION 4.5.2 dmake: Executing shell macro: gcc -dumpversion GCC_MAJOR_VERSION 4 GCC_4XX define CFLAGS -static-libgcc LIBC -static-libgcc

Not sure how that fits in with your method of building. I've only ever built perl with gcc by running dmake -f makefile.mk

Yup, thats what I do, the -f makefile.mk isn't mandatory since that is the default

Replies are listed 'Best First'.
Re^4: perl 5.14.0-RC1 is available for testing!
by Anonymous Monk on Apr 24, 2011 at 12:43 UTC
    You know, I wrote a little program to use objdump to find out what dlls are linked to perl.exe/perl514.dll , to copy them to t directory

    I tested it, it worked, and then I dawned me how stupid I find this :)

    The whole thing should be replaced with

    .IF "$(CCTYPE)" == "GCC" $(XCOPY) $(CCHOME)\bin\* ..\t\$(NULL) .ENDIF
    Since the dll's in ..\t\ aren't used for anything else and they're deleted during dmake clean

    KISS

Re^4: perl 5.14.0-RC1 is available for testing!
by syphilis (Archbishop) on Apr 24, 2011 at 16:29 UTC
    .IF "$(CCTYPE)" == "GCC" GCC_VERSION *= $(shell gcc -dumpversion) GCC_MAJOR_VERSION *= $(GCC_VERSION:b:b) .IF "$(GCC_MAJOR_VERSION)" == "4" GCC_4XX *= define .ENDIF .ENDIF
    If that works, it would be an improvement.
    One problem with it is that it's not guaranteed that the C compiler is called 'gcc'. With the mingw64 compiler that I use it's called 'x86_64-w64-mingw32-gcc' - and  gcc -dumpversion would simply return something like 'gcc' is not recognized as an internal or external command, operable program or batch file.

    I guess, however, there might also be a way to cater for that possibility.

    Cheers,
    Rob
      FWIW the actual compiler name is supposed to be in $(CC), CCTYPE is configuration variable I now prefer this.
        I now prefer this

        Could that be modified so that only the dll files get copied ? And would that work just as well ? (Or have I missed something ? I'll give it a try myself when I get a chance.)

        Copying the entire bin directory seems a bit heavy-handed to me.

        Cheers,
        Rob