Discussion:
pcc-libs compiling error
s***@gmail.com
2014-02-17 02:02:19 UTC
Permalink
Hi, I'm trying to compile pcc-libs under OS X Snow Leopard. pcc itself compiles and installs fine, but pcc-libs brings up errors with make.

-bash-3.2$ uname -a
Darwin my-macbook.home 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
-bash-3.2$ make
===> libsoftfloat
make[1]: Nothing to be done for `all'.
<=== libsoftfloat
===> libpcc
pcc -O -I. -DTARGET_LITTLE_ENDIAN=1 -Dos_darwin -isystem ../libpcc/include -c ssp.c
/usr/include//secure/_string.h, line 88: warning: illegal combination of pointer and integer
/tmp/ctm.AoSRir:4:unknown section type: @progbits
/tmp/ctm.AoSRir:4:Rest of line ignored. 1st junk character valued 32 ( ).
make[1]: *** [ssp.o] Error 1
make: *** [all] Error 2
-bash-3.2$
Michael Shalayeff
2014-02-17 15:31:13 UTC
Permalink
Post by s***@gmail.com
Hi, I'm trying to compile pcc-libs under OS X Snow Leopard. pcc itself compiles and installs fine, but pcc-libs brings up errors with make.
-bash-3.2$ uname -a
Darwin my-macbook.home 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
-bash-3.2$ make
===> libsoftfloat
make[1]: Nothing to be done for `all'.
<=== libsoftfloat
===> libpcc
pcc -O -I. -DTARGET_LITTLE_ENDIAN=1 -Dos_darwin -isystem ../libpcc/include -c ssp.c
/usr/include//secure/_string.h, line 88: warning: illegal combination of pointer and integer
/tmp/ctm.AoSRir:4:Rest of line ignored. 1st junk character valued 32 ( ).
this appears so assembler is incompatible with gnu gas.
cu
--
paranoic mickey (my employers have changed but, the name has remained)
Thorsten Glaser
2014-02-17 16:53:03 UTC
Permalink
Post by Michael Shalayeff
Post by s***@gmail.com
/tmp/ctm.AoSRir:4:Rest of line ignored. 1st junk character valued 32 ( ).
this appears so assembler is incompatible with gnu gas.
Hm yes, OSX has a history of not being compatible here…
but I think in this case it’s a Mach-O vs. ELF problem,
isn’t it?

bye,
//mirabilos
--
<Natureshadow> Ach, mach doch was du willst, du hast doch eh immer Recht!
<mirabilos> jupp ~/.etc/sig………
<Natureshadow> unfaßbar…
<Natureshadow> Mit Eszett sogar, unfaßbar!
Antoine Leca
2014-02-20 09:55:39 UTC
Permalink
Post by Michael Shalayeff
Hi, I'm trying to compile pcc-libs under OS X Snow Leopard. [...]
pcc -O -I. -DTARGET_LITTLE_ENDIAN=1 -Dos_darwin -isystem ../libpcc/include -c ssp.c
/usr/include//secure/_string.h, line 88: warning: illegal combination of pointer and integer
/tmp/ctm.AoSRir:4:Rest of line ignored. 1st junk character valued 32 ( ).
this appears so assembler is incompatible with gnu gas.
I beg to differ, unless we disagree on the meaning of "gnu gas".
@progbits is an ELF feature, and Mac OS X does not use ELF, rather
Mach-O; thus if the compiler generates such assembler code, something is
wrong in code generation, probably some #ifdef ELFABI missing.

Alternatively, if SSP (stack smashing protection) is not supported on
Mach-O/MacOS, then the Makefile for pcc-libs should be adjusted to avoid
including ssp.c (I remember I had to do that when targeting some
proprietary a.out-based ABI.)


Antoine
Anders Magnusson
2014-02-20 10:15:51 UTC
Permalink
Post by Antoine Leca
Alternatively, if SSP (stack smashing protection) is not supported on
Mach-O/MacOS, then the Makefile for pcc-libs should be adjusted to avoid
including ssp.c (I remember I had to do that when targeting some
proprietary a.out-based ABI.)
SSP is a compiler-only thing so it makes no sense disabling it.

-- Ragge
Michael Shalayeff
2014-02-20 10:12:31 UTC
Permalink
Post by Anders Magnusson
Post by Antoine Leca
Alternatively, if SSP (stack smashing protection) is not supported on
Mach-O/MacOS, then the Makefile for pcc-libs should be adjusted to avoid
including ssp.c (I remember I had to do that when targeting some
proprietary a.out-based ABI.)
SSP is a compiler-only thing so it makes no sense disabling it.
OS X provides binutils 1.7 which is an ancient version
and does not support alot of things...
cu
--
paranoic mickey (my employers have changed but, the name has remained)
Anders Magnusson
2014-02-20 10:32:57 UTC
Permalink
Post by Michael Shalayeff
Post by Anders Magnusson
Post by Antoine Leca
Alternatively, if SSP (stack smashing protection) is not supported on
Mach-O/MacOS, then the Makefile for pcc-libs should be adjusted to avoid
including ssp.c (I remember I had to do that when targeting some
proprietary a.out-based ABI.)
SSP is a compiler-only thing so it makes no sense disabling it.
OS X provides binutils 1.7 which is an ancient version
and does not support alot of things...
It do not matter since pcc provides its own implementation of the ssp
code. Which failed during compilation...

-- R
Anders Magnusson
2014-02-20 10:31:42 UTC
Permalink
Post by s***@gmail.com
Hi, I'm trying to compile pcc-libs under OS X Snow Leopard. pcc itself compiles and installs fine, but pcc-libs brings up errors with make.
-bash-3.2$ uname -a
Darwin my-macbook.home 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
-bash-3.2$ make
===> libsoftfloat
make[1]: Nothing to be done for `all'.
<=== libsoftfloat
===> libpcc
pcc -O -I. -DTARGET_LITTLE_ENDIAN=1 -Dos_darwin -isystem ../libpcc/include -c ssp.c
/usr/include//secure/_string.h, line 88: warning: illegal combination of pointer and integer
/tmp/ctm.AoSRir:4:Rest of line ignored. 1st junk character valued 32 ( ).
make[1]: *** [ssp.o] Error 1
make: *** [all] Error 2
-bash-3.2$
Which pcc did you use? I just tried with -current, and it didn't even
compile on 10.9. Some code is missing.

For the above problem, the constructors must be understood by as.

Hm, I'm wondering how apple thinks here:

% uname -a
Darwin macragge.local 13.0.2 Darwin Kernel Version 13.0.2: Sun Sep 29
19:38:57 PDT 2013; root:xnu-2422.75.4~1/RELEASE_X86_64 x86_64 i386
% uname -p
i386

This makes pcc trying to generate a 32-bit compiler, not 64-bit. Someone
have a hint how to deal with this?

-- Ragge
Thorsten Glaser
2014-02-20 13:34:33 UTC
Permalink
Post by Anders Magnusson
% uname -a
Darwin macragge.local 13.0.2 Darwin Kernel Version 13.0.2: Sun Sep 29 19:38:57
PDT 2013; root:xnu-2422.75.4~1/RELEASE_X86_64 x86_64 i386
% uname -p
i386
This makes pcc trying to generate a 32-bit compiler, not 64-bit. Someone have a
hint how to deal with this?
Known Apple bug. Let the user override this manually
(since you can build both). I’ve had the same issue
with mirmake on Darwin.

bye,
//mirabilos
--
<Natureshadow> Ach, mach doch was du willst, du hast doch eh immer Recht!
<mirabilos> jupp ~/.etc/sig………
<Natureshadow> unfaßbar…
<Natureshadow> Mit Eszett sogar, unfaßbar!
Loading...