AmigaLabs / adtools

Experimental GNU toolchain for AmigaOS
0 stars 1 forks source link

clib4 SPE and GCC6 #8

Closed 3246251196 closed 1 month ago

3246251196 commented 6 months ago

I see in the GNUMakefile.os4 of clib4:

ifdef SPE
    CC := ppc-amigaos-gcc-6.4.0
    AS := ppc-amigaos-as-6.4.0
    CMATH := -mfpu=dp_lite
    CFLAGS := $(CFLAGS) -D__SPE__ -mspe -mtune=8540 -mcpu=8540 -mabi=spe -mfloat-gprs=double $(CMATH) -fno-inline-functions -fno-partial-inlining \
                -fno-align-functions -fno-align-jumps -fno-align-loops -fno-align-labels -fno-inline-small-functions -fno-indirect-inlining -Wno-overflow -Wno-unused-but-set-variable -Wno-uninitialized #-Wdouble-promotion
    AFLAGS := $(AFLAGS) -mvrsave -D__SPE__ -mspe -mtune=8540 -mcpu=8540 -mfloat-gprs=double $(CMATH) -Wno-overflow
endif

This may mean I need to change the makefile in ADTOOLS to define SPE somewhere when building clib4 for GCC 6. Does this make sense, @afxgroup ?

afxgroup commented 6 months ago

No, that ifdef is used if you pass SPE=1 at GNUMakefile if you want to compile the library for SPE machines.

3246251196 commented 6 months ago

Right... which is what we want to do for certain machines + gcc6.

It would mean that we would need to provide a way to turn on SPE when building adtools if you wanted to build clib4 with SPE.

3246251196 commented 1 month ago

I think we should close this ticket. You simply need to define - somewhere - whether it is an export or local variable SPE. My issue was whether or not we should add it to the makefile of adtools - but there gets a point where you end up creating a monsterous makefile/script just in order to be too helpful!

Re-open if you want to bring this back up.

afxgroup commented 1 month ago

SPE is needed not only for specific flags but it enables also for example the calling of PatchForSPE exe for example. I think that adding some more rules doesn't involve in readability. Instead i'm pretty syre that specific libraries gmk files can be optimized