This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
> >From karuottu@freenet.hut.fi Mon Oct 19 04:20:24 1998 > > When looking at the available Cygnus config files for 'm68k-elf': > >'config/m68k/m68kelf.h', 'config/m68k/m68020-elf.h', 'config/elfos.h' > > etc., they all said that they are 'freely distributable' using GPL... > > So, why this 'reinventing the wheel' method was needed? Why not just > > use the 'CYGNUS LOCAL' configuration settings as the base? > > Sorry, but I have no idea what you're referring to when you say "CYGNUS > LOCAL". I don't recall anything about it in the FAQ (oddly enough I did > just see a message on the egcs list talking about "CYGNUS LOCAL" wrt > java, but I still didn't understand what it meant). A clip from the original Cygwin32 b18 sources, the 'gcc/configure' script file: --------------clip----------------------------------------- extra_parts="crtbegin.o crtend.o" extra_headers=math-68881.h ;; m68020-*-elf* | m68k-*-elf*) # CYGNUS LOCAL m68k-elf tm_file="m68k/m68020-elf.h libgloss.h" xm_file=m68k/xm-m68kv.h tmake_file=m68k/t-m68kelf header_files=math-68881.h ;; m68k-*-linux*aout*) # Motorola m68k's running Linux xm_file=m68k/xm-linux.h # with a.out format -----------------clip--------------------------------------- With 'CYGNUS LOCAL' I mean those configurations which are included only with Cygnus sources... > All I know is, when I asked last February about elf for m68k, Mark > Phillips was the only one who offered patches. When I asked on the > egcs list this summer (being surprised that there still was no m68k-elf > support), I was told by Jeffrey Law (who I believe works for Cygnus) > that no one had submitted patches, that I could send in Mark Phillips's > patches, but they'd probably have to get him to assign the patches to > the FSF before they could include them. If Cygnus has m68k-elf patches, > I have no idea why those can't be put in egcs. They probably don't just have 'patches', I remember the 'm68k-elf' being one of the embedded target formats they support... Ok, taking someone of those config files, like the 'm68020-elf.h' and looking at it: -------------------------------------------- /* CYGNUS LOCAL (entire file) m68k-elf */ /* Definitions of target machine for GNU compiler. "naked" 68020, elf object files and debugging, version. Copyright (C) 1987, 1988, 1992, 1995, 1996 Free Software Foundation, Inc. This file is part of GNU CC. GNU CC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This comment is here to see if it will keep Sun's cpp from dying. */ #include "m68k/m68k-none.h" /* m68k/m68kemb.h sets some macros in ways that contradict the svr4 abi; compliance when using elf is probably a good idea. */ /* #include "m68k/m68kemb.h" */ #include "m68k/m68kelf.h" #include "elfos.h" /* We need to override the default specs from elfos.h. This suppresses the loading of crt0.o by gcc's default linker spec. For embedded targets crt0 now comes from the linker script. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "crtbegin.o%s" #undef ENDFILE_SPEC #define ENDFILE_SPEC "crtend.o%s" #define LIB_SPEC "-lc" /* end of m68020-elf.h */ --------------------------------------------------- tells that there should be any troubles with taking these, fix them for egcs-1.1 or gcc-2.8.1, if needed, probably Cygnus has up-to-date ones for these. The Cygwin32 b19 was stripped from other than 'x86' stuff, but let's hope the b20 (based on egcs-1.1) has again the other target sources included... Cygnus CDK sources from Feb. 1998 were with the ARM-gcc binaries, available via 'www.armltd.co.uk'. The '.tar.gz' was about 30 M, so downloading this to get up- to-date config files for those 'CYGNUS LOCAL' ones, has not been motivated through my current modem connection to the net... So I preferred to look at the April-97 sources when trying 'm68k-elf' and 'i386-elf'. The only fixes I remember having done with these config files are the adding of '-m5200' and '-mcpu32' specific library generation via the 'MULTILIB' definitions and fixing the macro (shown here as fixed): ------------------------------------------------------------- #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC) \ do { \ if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \ fprintf (FILE, ".section\t%s,\"ax\"\n", (NAME)); \ else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \ fprintf (FILE, ".section\t%s,\"a\"\n", (NAME)); \ else \ fprintf (FILE, ".section\t%s,\"aw\"\n", (NAME)); \ } while (0) ------------------------------------------------------------- in the file 'm68kelf.h'. The 'RELOC' was missing from the original 2.7.2-970404 version file. I made the 'm68k-elf' just to see that it could be built, but the 'i386-elf' was my second time to make a combined 'embedded-x86' compiler, now capable of producing 'pure elf_i386' code and SVR4 or Linux ELF-binaries using 'glue' libraries' with low-level I/O-routines, memory handling etc. for SVR4/i386 and Linux. (My earlies one produced 'i386-coff' and had glue libs for SCO/Linux with ibcs2 and DOS/go32) As everybody knows, newlib has some support for SCO or 'sysvi386' target... The SVR4 syscalls are superset of the SVR3.2 ones so there weren't much troubles to get the 'i386-elf' compiler to produce simple SVR4-ELF programs, which seemed to run Ok under Linux with ibcs2... Ok, SCO UnixWare 2.1 is free for hobbyists, but its libs & headers cannot be distributed with a Linux-to-SVR4/i386 cross-compiler... Okeydokey, I can email the 'm68k-elf' config files, based on the Cygnus-gcc-2.7.2-970404 sources, and updated for egcs-1.1, if someone wants them. The packed size is under 13 kbytes and the files are aimed to be unpacked into 'gcc/config/m68k' in egcs-1.1 sources: C:\temp\m68k>tar tvzf m68kelf.tgz -rwxr-xr-- root/root 223 1998-10-05 12:45 m68kelf.cnf -rw-r--r-- root/root 1072 1998-10-01 09:28 t-m68kelf -rw-r--r-- root/root 12634 1998-09-24 00:53 m68kelf.h -rw-r--r-- root/root 1600 1997-04-15 10:57 m68020-elf.h -rw-r--r-- root/root 25009 1997-04-15 10:54 ../elfos.h The 'm68kelf.cnf' entry should be added to the 'gcc/configure' (e.g. before the 'm68k-linux-aout' one). Cheers, Kai ________________________________________________ To get help for the crossgcc list, send mail to crossgcc-request@cygnus.com with the text 'help' (without the quotes) in the body of the message.