delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/23/20:18:05

From: bukinm AT inp DOT nsk DOT su (Michael Bukin)
Newsgroups: comp.os.msdos.djgpp
Subject: Problems with pgcc
Date: Thu, 22 May 1997 12:34:45 GMT
Organization: BINP SD RAS
Lines: 60
Message-ID: <338431e9.9258972@news-win.inp.nsk.su>
Reply-To: bukinm AT inp DOT nsk DOT su
NNTP-Posting-Host: csd-bsdi.inp.nsk.su
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

1. When compiling tested C++ program with virtual functions
linker says:

d:/comp/djgpp/tmp/ccaaaaaa1.o(.text+0x136):cctest0.cc: undefined
reference to `__rtti_si'
d:/comp/djgpp/tmp/ccaaaaaa1.o(.text+0x162):cctest0.cc: undefined
reference to `__rtti_user'


2. Also, it looks like pgcc does not recognize GCC_EXEC_PREFIX.
gcc should first try to execute stage by appending name to the
value of GCC_EXEC_PREFIX and then in standard places.
For more info, read this: info gcc invo envi

Part of djgpp.env:
---------
[pcpp]
CPLUS_INCLUDE_PATH=%/>;CPLUS_INCLUDE_PATH%%DJDIR%/lang/cxx;%DJDIR%/include
C_INCLUDE_PATH=%/>;C_INCLUDE_PATH%%DJDIR%/include
OBJCPLUS_INCLUDE_PATH=%/>;OBJCPLUS_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/lang/objc
OBJC_INCLUDE_PATH=%/>;OBJC_INCLUDE_PATH%%DJDIR%/include;%DJDIR%/lang/objc

[pgcc]
GCC_EXEC_PREFIX=%DJDIR%/bin/p
# Expecting .../bin/pcpp.exe, .../bin/pcc1.exe, ...
COMPILER_PATH=%/>;COMPILER_PATH%%DJDIR%/bin
LIBRARY_PATH=%/>;LIBRARY_PATH%%DJDIR%/lib/pgcc;%DJDIR%/lib
---------

pgcc -v:
Reading specs from d:/comp/djgpp/lib/pgcc/specs
                   ^^^^^ LIBRARY_PATH was used

gcc driver version 2.7.2p snapshot 970509 executing gcc version 2.7.2p
 cpp -lang-c++ -v -iprefix d:/comp/djgpp/bin/pi386-go32-msdos/2.7.2p/
                           ^^^ GCC_EXEC_PREFIX used here
 ^^^ GCC_EXEC_PREFIX was not used (I have pcpp.exe where it should be)

-undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=7
-Dunix -Di386 -DGO32 -DMSDOS -DDJGPP=2 -DDJGPP_MINOR=1 -D__unix__
-D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=1
-D__unix -D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2 -D__DJGPP_MINOR=1
-Asystem(unix) -Asystem(msdos) -Acpu(i386) -Amachine(i386) cctest0.cc 
..

gcc -v:
Reading specs from d:/comp/djgpp/lib\specs
gcc version 2.7.2.1.f.1
 d:/comp/djgpp/bin\cpp.exe -lang-c++ -v -undef -D__GNUC__=2
-D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=7 -Dunix -Di386 -DGO32
-DMSDOS -DDJGPP=2 -DDJGPP_MINOR=1 -D__unix__ -D__i386__ -D__GO32__
-D__MSDOS__ -D__DJGPP__=2 -D__DJGPP_MINOR__=1 -D__unix -D__i386
-D__GO32 -D__MSDOS -D__DJGPP=2 -D__DJGPP_MINOR=1 -Asystem(unix)
-Asystem(msdos) -Acpu(i386) -Amachine(i386) cctest0.cc
..


The idea of using GCC_EXEC_PREFIX was to have two (or more)
compilers at the same time, and to call them with different names.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019