Commit Graph

747 Commits

Author SHA1 Message Date
asau
9f9e90f73c Test for <sys/endian.h> and provide HAVE_SYS_ENDIAN_H.
Fixes FreeBSD hosted builds (PR 42440 and PR 42470).

Approved by <dholland>.
2010-01-15 11:26:25 +00:00
christos
f9076c1664 undef and redefine instead of checking if it is define, from joerg 2010-01-14 21:38:19 +00:00
christos
76aa0f6aa7 provide __arraycount for those that don't have it. 2010-01-14 21:26:56 +00:00
tsutsui
d3724ba41f Add necessary byteswap ops for tools disklabel(8) used with -F option
(treating a target disk as a regular file and suppressing ioctl(2)s)
on reading/writing disklabel in a target file.
This allows cross build enviroment creating bootable disk images
for targets in different endian.
No functional changes to native (non-tools) disklabel(8) command.

Closes PR toolchain/42357.
2010-01-05 15:45:26 +00:00
tsutsui
47ef4e54e9 Include "nbtool_config.h" for src/tools/zic/ and
remove bogus -DNOID to disable __RCSID().

XXX: should we also remove #ifndef lint from scheck.c and zic.c?
2010-01-02 10:42:49 +00:00
he
1058cef38c To unbreak the build, temporarily remove the build of libelf here,
since no other part of the build depends on this yet.

Suggested as a temporary workaround by thorpej@
2009-12-29 22:13:00 +00:00
thorpej
69ceabfc59 Include nbtool_config.h as needed. Should fix missing defn of __unused in
some host tool environments.
2009-12-29 17:32:18 +00:00
cegger
49fd8fe03d Add tooldir include path.
This fixes amd64 toolchain build on OSX.
2009-12-23 20:28:29 +00:00
mrg
8c0cbe863f revert the previous; not intended to be part of that commit, or any commit 2009-12-23 20:17:13 +00:00
mrg
3fa4bcf59c rework the main SUBDIR list here as suggested by enami. put .WAIT on
the same line as the target that needs to wait, but before the target,
rather than on the previous line, which led to confusion and an error
being introduced in the previous change.
2009-12-23 20:15:21 +00:00
mrg
2dc54d1398 move the build of pax before libelf. fixes my build of tools/libelf,
though i didn't look to see why libelf needs pax.
2009-12-21 20:57:36 +00:00
thorpej
aa6d6cf7b8 Add support for building libelf in a host-tool environment.
XXX Makefile.disklabel is really mis-named, but I'm not going to tackle
that problem right now.
2009-12-21 18:21:17 +00:00
uebayasi
656d7ae41f get_libgcc_new: Make previous work for digit only ABI names. 2009-12-17 15:48:13 +00:00
uebayasi
eae6ecc426 get_libgcc_new: Teach multilib. 2009-12-17 15:01:33 +00:00
uebayasi
6d1f240d45 Fix parallel build. Analyzed & patch provided by enami@, thanks! 2009-12-15 11:39:05 +00:00
christos
a31812a3a1 disable only parallel make. 2009-12-14 14:13:16 +00:00
uebayasi
0d144fa114 Disable parallel build, which always fails at compiling itable.c / interp.c.
Only affect MKCROSSGDB=yes.
2009-12-14 08:51:31 +00:00
pooka
d6224f4507 Remove support for NetBSD/playstation2. 2009-12-05 16:29:10 +00:00
uebayasi
83246377bb Revert previous, which caused tools build to fail. 2009-12-01 17:06:34 +00:00
uebayasi
ab788f10b4 Use ${NETBSDSRCDIR} for deep tools/* directories. 2009-12-01 09:08:25 +00:00
uebayasi
ba9e6e8ae6 Add pkg_install as a tool. 2009-12-01 09:01:45 +00:00
uebayasi
3cb0739866 Skip parameters for multilib build for now. 2009-12-01 04:59:24 +00:00
uebayasi
87bb55865b Handle cases where *.asm is listed in LIB2FUNCS_EXTRA (gcc/config/rs6000). 2009-12-01 03:13:26 +00:00
uebayasi
3a3e699038 Handle cases where database text files don't exist. 2009-11-30 14:34:17 +00:00
uebayasi
d77ecd459a Call "template sources" as "tmplsrcs", not "tmpsrcs". Requested by mrg@. 2009-11-30 10:03:57 +00:00
uebayasi
970b30eb96 Prefix per-library *.mk files with libs.*. 2009-11-30 09:57:59 +00:00
uebayasi
d3180e0c9b Now that we know what sources are needed to build a given library, we need
the rules how to build those sources.  Generate makefiles defining ${COPTS},
${CPPFLAGS}, and ${SRCS} (== template).

Note that ${CPPFLAGS} is actually dfined as _CPPFLAGS like
	_CPPFLAGS.tmp___gcc_bcmp.c=-DL__gcc_bcmp
and used to generate wrapper files (e.g. tmp___gcc_bcmp.c).  Otherwise it's
automagically passed to ${CC} by bsd.*.mk.
2009-11-30 09:50:59 +00:00
uebayasi
2c455e268f For each library, generate a makefile of the list of template sources too. 2009-11-30 09:33:36 +00:00
uebayasi
c91d9ec35a For each library, generate a list of sources (*.[cS]).
We create wrapper sources (tmp_*.[cS]) on-the-fly and compile them.  For
example, __gcc_bcmp() is compiled using tmp___gcc_bcmp.c, which #define's
L__gcc_bcmp and #include's libgcc2.c.
2009-11-30 09:32:13 +00:00
uebayasi
263a9a2c47 Move these analyzing functions into one place, get_libgcc_new_analyze(). 2009-11-30 08:20:23 +00:00
uebayasi
b98c239900 Typo. 2009-11-30 08:05:41 +00:00
uebayasi
1380d82f90 Generate lists of template sources ("tmpsrcs") for each libraries. We'll
need these to create wrappers of tmpsrcs and define correct dependencies.
2009-11-30 08:00:20 +00:00
uebayasi
141ef6c4d0 Generate *.o -> template *.[cS] ("tmpsrc") mapping.
Functions are built from a template (tmpsrc).  We create wrapper sources
(src) and define necessary defines and #include tmpsrc.
2009-11-30 07:19:58 +00:00
uebayasi
96a4ab5aed - Generate a list of CPP flags used to build *.o. Some files are build
repeatedly with different -DXXX to generate similar objects (e.g. different
  type size).

- Generate a list of other CC options to build *.o.

(See my sed-fu using hold space in get_libgcc_list_objs_xflags().)
2009-11-30 07:08:03 +00:00
uebayasi
7e684b1d37 - Generate a list of *.o -> lib*.{a,so} mapping. This is also known by
parsing dependency lines in libgcc.mk.

- Generate a list of *.o -> *.{c,S} mapping.  *.S files are known as
  ${LIB1ASMFUNCS}.  Assume other *.o files are built from *.c.  This information
  is needed to generated wrapper sources later.
2009-11-30 06:56:15 +00:00
uebayasi
12ee13e800 Generate lists of functions built in libgcc libraries. This is known by
pattern matching dependency lines in libgcc.mk.
2009-11-30 06:40:17 +00:00
uebayasi
00c7a5b61c Generate a list of functions provided as *.S. 2009-11-30 06:29:58 +00:00
uebayasi
b0edbfb088 Define paths of newly generated files. 2009-11-30 06:13:37 +00:00
uebayasi
ffa99e7e3a Start implementing the new style libgcc "mknative" converter which generates
BSD makefiles to build libgcc.  The goal is to build all functions rather
than managing the set of functions in gnu/lib/libgcc/Makefile.in by hand.

Because of the complexity of the build procedure, I leave not only generated
makefiles but also intermediate, analyzed data so that people can verify that
the conversion is done correctly.
2009-11-30 05:50:07 +00:00
uebayasi
d219709b67 Actually use timestamp file's timestamps so that things rebuild correctly. 2009-11-25 11:49:36 +00:00
uebayasi
912aaddf6c Adjust #line directive paths so that make depend works correctly. 2009-11-24 15:09:10 +00:00
skrll
af515df4eb Pull in fixes from binutils_2_19 branch.
Bump version and re-run mknative to pick up.
2009-11-20 22:51:29 +00:00
he
71b0977302 Point to the new ncdcs directory. 2009-11-13 08:14:53 +00:00
tron
b99b4b6003 Revert most of revision 1.73:
We cannot user_from_uid(3) or group_from_gid(3) unless the system
also supports pwcache_userdb(3) and pwcache_groupdb(3). The build will
use the hosts password and user database otherwise. Switch back to the
old behaviour to only the native functions if they are all present.
This fixes cross builds under Mac OS X and FreeBSD.

Fix based on problem analysis provided by Akihiko Hayashi.
2009-11-11 21:53:46 +00:00
skrll
1cb5794926 Collect the branding information. 2009-11-09 13:50:41 +00:00
skrll
d92e258298 Update for new binutils location, etc. 2009-11-08 15:33:29 +00:00
joerg
14197c258c Define __RCSID and __COPYRIGHT as structure, so that the following
semicolon is consumed.
2009-11-06 18:26:06 +00:00
joerg
133a83e65e Make sure that parser.c and friends can be found. 2009-11-06 15:14:37 +00:00
christos
43c1f29388 prevent $ NetBSD expansion. 2009-11-03 22:52:59 +00:00
joerg
73810e776b Need to provide NOMAN explicitly before bsd.own.mk. 2009-10-30 17:18:51 +00:00