Bug#256347: openoffice.org-bin: sparc32plus shared library but no normal sparc file
This is in the upstream build.
jim@sun:~/OpenOffice.org1.1.2/program$ file * | grep PLUS
libsal.so.3.1.0: ELF 32-bit MSB shared object, SPARC32PLUS, V8+
Required, version 1 (SYSV), stripped
------------------------------------
So i check all the produced files in sal:
jim@sun:/usr/local/src/112/sal/unxlngs.pro/lib$ file * | grep PLUS
libsal.so.3.1.0: ELF 32-bit MSB shared object, SPARC32PLUS, V8+ Required,
version 1 (SYSV), not stripped
jim@sun:/usr/local/src/112/sal/unxlngs.pro/obj$ file * | grep PLUS
interlck.o: ELF 32-bit MSB relocatable, SPARC32PLUS, V8+ Required,
version 1 (SYSV), not stripped
jim@sun:/usr/local/src/112/sal/unxlngs.pro/slo$ file * | grep PLUS
interlck.o: ELF 32-bit MSB relocatable, SPARC32PLUS, V8+
Required, version 1 (SYSV), not stripped
---------------------------------------------
OK, it is only interlck.o
Now the makefile for this is in sal/osl/unx includes this code:
.IF "$(OS)$(CPU)"=="SOLARISS" || "$(OS)$(CPU)"=="NETBSDS" ||
"$(OS)$(CPU)"=="LINUXS"
$(SLO)$/interlck.obj: $(SLO)$/interlck.o
touch $(SLO)$/interlck.obj
$(OBJ)$/interlck.obj: $(OBJ)$/interlck.o
touch $(OBJ)$/interlck.obj
$(SLO)$/interlck.o: $(MISC)$/interlck_sparc.s
$(ASM) $(AFLAGS) -o $@ $<
$(OBJ)$/interlck.o: $(MISC)$/interlck_sparc.s
$(ASM) $(AFLAGS) -o $@ $<
$(MISC)$/interlck_sparc.s: asm/interlck_sparc.s
+tr -d "\015" < $< > $@
.ENDIF
This code existed already, for linux sparc port I simply added the last
condition:
|| "$(OS)$(CPU)"=="LINUXS"
----------------------------------------
Now look at solenv/inc/unxlngs.mk:
# mk file for unxlngs
ASM=$(CC)
AFLAGS=-Wa,-Av8plus,-K,PIC -c $(CDEFS)
--------------------------------------------------------
Also in sal/osl/unx/asm/interlck_sparc.s this comment:
/*
* Implements osl_[increment|decrement]InterlockedCount in two ways:
* sparcv8 architecture: use the "swap" instruction
* sparcv9/sparcv8plus architecture: use the "cas" instruction
*
* Initialize once with osl_InterlockedCountSetV9(int bv9) if you want to
* use the "cas" instruction, which is faster (no spinlock needed)
* Default is to use the "swap" instruction, which works on all supported
* SPARC cpu's
*
* osl_InterlockedCountSetV9(int bv9)
* bv9 = 0 use sparcv8 "swap" (spinlock)
* bv9 = 1 use sparcv9/sparcv8plus "cas" (no spinlock)
*
/*
-------------------------------------------------
Sorry i dont understand much about this, but I will try any suggestions.
Thomas, can you review the code here and advise what might be done about this?
http://porting.openoffice.org/source/browse/porting/sal/osl/unx/asm/interlck_sparc.s
Meanwhile I will just try removing that AFLAG and see what happens. -Av8plus
thanks
jim
On Saturday 26 June 2004 21:36, Thomas Bogendoerfer wrote:
> Package: openoffice.org-bin
> Version: 1.1.1-3
> Severity: grave
> Justification: renders package unusable
>
> /usr/lib/openoffice/program/libsal.so.3.1.0 is compiled with the wrong
> flags, so it does run only on Ultra Sparc CPUs, but not on 32bit Sparc
> CPUs.
>
Reply to: