Hi, On 2023-12-01 23:06:59 +0000, Sacha Hottinger wrote: > // I used the patch command to patch the src/backend/port/Makefile with your > attached file and tried again with the Sun Studio compiler. There is now a > different error at this stage: > … > /opt/developerstudio12.6/bin/cc -m64 -xarch=native -Xa -v -O > -I../../../src/include -c -o pg_shmem.o pg_shmem.c > echo | /usr/bin/clang -Wno-ignored-attributes -fno-strict-aliasing -fwrapv > -O2 -I../../../src/include -flto=thin -emit-llvm -c -xc -o tas.bc tas.s > tas.s:1:1: error: expected identifier or '(' > !------------------------------------------------------------------------- > ^ > 1 error generated.
That's me making a silly mistake... I've attached at an updated, but still blindly written, diff. > // Have attached the config.log, gmake all full log, and patched Makefile. Could you attach config.log and gmake for the gcc based build? Because so far I have no idea what causes the linker issue there. Greetings, Andres Freund
diff --git i/src/backend/port/Makefile w/src/backend/port/Makefile index 47338d99229..4b3bd9af229 100644 --- i/src/backend/port/Makefile +++ w/src/backend/port/Makefile @@ -33,6 +33,14 @@ endif include $(top_srcdir)/src/backend/common.mk +# Hacky rule to allow clang to generate tas.bc. One reasonably would think +# that we could just compile tas.s, but on solaris tas.s can't be parsed with +# clang. It's not interesting from a JIT perspective anyway, so just generate +# an empty file. + +tas.bc: tas.s + echo | $(COMPILE.c.bc) -xc -o $@ - + tas.o: tas.s ifeq ($(SUN_STUDIO_CC), yes) # preprocess assembler file with cpp