delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/19/10:07:32

Date: Wed, 19 Nov 1997 17:06:28 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Michael Deck <deckm AT cleansoft DOT com>
cc: Nate Eldredge <eldredge AT ap DOT net>, djgpp AT delorie DOT com
Subject: Re: Problems building djgpp (long)
In-Reply-To: <3471B2CA.5D26@cleansoft.com>
Message-ID: <Pine.SUN.3.91.971119170536.9459I-100000@is>
MIME-Version: 1.0

On Tue, 18 Nov 1997, Michael Deck wrote:

> E:\djgpp\mddtest>gcc -v -o test.exe test.cc
> Reading specs from e:/djgpp/lib\specs
> gcc version 2.7.2.1
>  e:/djgpp/bin\ld.exe -o test.exe e:/djgpp/lib\crt0.o -Le:/djgpp/lib
> test.cc -Tdj
> gpp.djl -lgcc -lc -lgcc
> test.cc: file not recognized: File format not recognized

OK, I think I know what's your problem.  It's an LFN snafu again.
Before you read the rest, look at the file specs.h in the top-level
gcc source directory (%DJDIR%/gnu/gcc-2721/).  If it's empty, or
includes only comments, then what I say below *is* your problem;
otherwise you will have to step with a debugger into gcc and tell me
why doesn't it recognize C++ sources.

Here's what specs.h *should* say:

  /* specs.h */ 
  #include "cp/lang-specs.h" 
  #include "ada/lang-specs.h" 

Without these 2 include's, the rules that make gcc recognize C++ (and
Ada) source files are not known to gcc, and it by default assumes that
these files are linker scripts or object files.

Here are the relevant lines from config/msdos/configure.bat:

  if not exist cp\make-lang.in goto no_cp
  ...
  if exist cp\lang-options.h echo #include "cp/lang-options.h" >> options.h
  if exist ada\lang-options.h echo #include "ada/lang-options.h" >> options.h
  if exist f\lang-options.h echo #include "f/lang-options.h" >> options.h
  echo /* specs.h */ > specs.h
  if exist cp\lang-specs.h echo #include "cp/lang-specs.h" >> specs.h
  if exist ada\lang-specs.h echo #include "ada/lang-specs.h" >> specs.h
  if exist f\lang-specs.h echo #include "f/lang-specs.h" >> specs.h

Since the original distribution is not LFN-clean, it comes with
lang-spe.h, lang-opt.h etc., and COMMAND.COM thinks these files don't
exist.  So the relevant lines are not written into the headers
options.h and specs.h.  If cp/make-lang.in doesn't exist, cp/Makefile
won't be even created.

You need to rename those files to their original long names.  After
that, run "configure go32" again, delete gcc.o and say "make CFLAGS=-O2" 
again.  Then chdir to cp, delete all *.o files and say "make CFLAGS=-O2" 
there also.  Now you should have gcc and cc1plus.

- Raw text -


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