On Wed, 19 Dec 2012 21:00:36 +0000 (GMT)
sorry been offline... what is the source, in the end, is it just
int main() { return 0; }
as it is here?
It is strange that a hello world program worked for you, but then does
that return an error also that we didn't detect?
also, is it the same without "-g" ?
I doubt that it is generating incorrect assembler though you could
compare the output of gcc against the pcc output to be sure.. most
likely I would think it would be the linked start/end files .. can
you show the output of "pcc -v" vs "gcc -v" ?
Well, the thing is that I naturally didn't check the return value of
the hello world program, which also turns out to be 96; the same
regardless of the presence of -g.
$ pcc -v hello.c
pcc 1.1.0.DEVEL 20121214 for x86_64-unknown-linux-gnu
Calling /usr/libexec/cpp -D_LP64 -D__LP64__ -D__amd64 -D__amd64__ -D__x86_64 -D__x86_64__ -D__ELF__ -D__linux__ -D__STDC_HOSTED__=1 -v -D__GNUC_STDC_INLINE__ -D__USER_LABEL_PREFIX__= -D__REGISTER_PREFIX__= -D__GNUC_PATCHLEVEL__=1 -D__GNUC_MINOR__=3 -D__GNUC__=4 -D__SIZEOF_WINT_T__=4 -D__PTRDIFF_TYPE__=long int -D__SIZE_TYPE__=unsigned long -D__WINT_TYPE__=unsigned int -D__WCHAR_MAX__=2147483647 -D__SIZEOF_WCHAR_T__=4 -D__WCHAR_TYPE__=int -D__STDC_ISO_10646__=200009L -D__LONG_LONG_MAX__=0x7fffffffffffffffLL -D__LONG_MAX__=0x7fffffffffffffffLL -D__INT_MAX__=0x7fffffff -D__SHRT_MAX__=32767 -D__SCHAR_MAX__=127 -D__VERSION__="pcc 1.1.0.DEVEL 20121214 for x86_64-unknown-linux-gnu" -D__PCC_MINORMINOR__=0 -D__PCC_MINOR__=1 -D__PCC__=1 -S /usr/include/pcc/ -S /usr/include -S /usr/lib64/pcc/x86_64-u
nknown-linux-gnu/1.1.0.DEVEL/include/ hello.c /tmp/ctm.Zq7QLY
PCC preprocessor version pcc 1.1.0.DEVEL 20121214 for x86_64-unknown-linux-gnu
Calling /usr/libexec/ccom -v /tmp/ctm.Zq7QLY /tmp/ctm.DiVMP5
ccom: pcc 1.1.0.DEVEL 20121214 for x86_64-unknown-linux-gnu
Calling /usr/bin/as -v /tmp/ctm.DiVMP5 -o /tmp/ctm.250oUc
GNU assembler version 2.23.51.0.1 (x86_64-redhat-linux) using BFD version version 2.23.51.0.1-3.fc18 20120806
Calling /usr/bin/ld -v -d -dynamic-linker /lib64/ld-linux-x86-64.so.2 -e _start /usr/lib64/pcc/x86_64-unknown-linux-gnu/1.1.0.DEVEL/lib/crt1.o /usr/lib64/pcc/x86_64-unknown-linux-gnu/1.1.0.DEVEL/lib/crti.o /usr/lib64/pcc/x86_64-unknown-linux-gnu/1.1.0.DEVEL/lib/crtbegin.o /tmp/ctm.250oUc -L/usr/lib64/pcc/x86_64-unknown-linux-gnu/1.1.0.DEVEL/lib/ -L/usr/lib64/ -lpcc -lc -lpcc /usr/lib64/pcc/x86_64-unknown-linux-gnu/1.1.0.DEVEL/lib/crtend.o /usr/lib64/pcc/x86_64-unknown-linux-gnu/1.1.0.DEVEL/lib/crtn.o
GNU ld version 2.23.51.0.1-3.fc18 20120806
$ gcc -v hello.c
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --disable-build-with-cxx --disable-build-poststage1-with-cxx --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-t
une=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.7.2 20121109 (Red Hat 4.7.2-8) (GCC)
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/cc1 -quiet -v hello.c -quiet -dumpbase hello.c -mtune=generic -march=x86-64 -auxbase hello -version -o /tmp/ccAOYyjC.s
GNU C (GCC) version 4.7.2 20121109 (Red Hat 4.7.2-8) (x86_64-redhat-linux)
compiled by GNU C version 4.7.2 20121109 (Red Hat 4.7.2-8), GMP version 5.0.5, MPFR version 3.1.1, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.7.2/include-fixed"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/include
/usr/local/include
/usr/include
End of search list.
GNU C (GCC) version 4.7.2 20121109 (Red Hat 4.7.2-8) (x86_64-redhat-linux)
compiled by GNU C version 4.7.2 20121109 (Red Hat 4.7.2-8), GMP version 5.0.5, MPFR version 3.1.1, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 71c7e38131c41f2b53aef8c65e624722
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
as -v --64 -o /tmp/ccWDGq03.o /tmp/ccAOYyjC.s
GNU assembler version 2.23.51.0.1 (x86_64-redhat-linux) using BFD version version 2.23.51.0.1-3.fc18 20120806
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/:/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/4.7.2/:/usr/lib/gcc/x86_64-redhat-linux/
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/4.7.2/:/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/collect2 --build-id
--no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64
-dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.7.2/crtbegin.o
-L/usr/lib/gcc/x86_64-redhat-linux/4.7.2
-L/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-L/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../.. /tmp/ccWDGq03.o
-lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed /usr/lib/gcc/x86_64-redhat-linux/4.7.2/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../lib64/crtn.o
--
Susi Lehtola
Fedora Project Contributor
***@fedoraproject.org