| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Ensure the cross assembler, linker and objcopy are used for the build32
stage, just like for the regular world stage.
Reviewed by: rodrigc, imp, bapt, emaste
Differential Revision: https://reviews.freebsd.org/D2187
|
|
|
|
|
|
|
|
|
|
| |
When compiling boot2 with gcc on i386 and pc98, only use the custom flag
-mno-align-long-strings when compiling with base gcc. This is checked
by comparing the version number against 4.2.1, which is not exactly
right, but good enough. (There is no other way to check whether we are
using the non-standard gcc in base, as far as I know.)
Reported by: rodrigc
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split the last gcc-specific flags off into CFLAGS.gcc. This also
removes the need to use -Qunused-arguments for clang throughout the
tree.
MFC r260369:
Apply band-aid for 32-bit compat libs failures after r260334: put back
-Qunused-arguments for clang for now, until I can figure out a way to
make it unneeded in all scenarios. Sorry about the breakage.
|
|
|
|
|
|
|
|
|
|
| |
For sys/boot/i386 and sys/boot/pc98, separate flags to be passed
directly to the linker (LD_FLAGS) from flags passed indirectly, via the
compiler driver (LDFLAGS).
This is because several Makefiles under sys/boot/i386 and sys/boot/pc98
use ${LD} directly to link, and the normal LDFLAGS value should not be
used in these cases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix this build for clang.
MFC r259730:
To avoid having to explicitly test COMPILER_TYPE for setting
clang-specific or gcc-specific flags, introduce the following new
variables for use in Makefiles:
CFLAGS.clang
CFLAGS.gcc
CXXFLAGS.clang
CXXFLAGS.gcc
In bsd.sys.mk, these get appended to the regular CFLAGS or CXXFLAGS for
the right compiler.
MFC r259913:
For libstand and sys/boot, split off gcc-only flags into CFLAGS.gcc.
MFC r259927:
Fix pc98 build, by also forcing COMPILER_TYPE in sys/boot/pc98/boot2's
Makefile.
Pointy hat to: dim
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
get rid of testing explicitly for clang (using ${CC:T:Mclang}) in
individual Makefiles.
Instead, use the following extra macros, for use with clang:
- NO_WERROR.clang (disables -Werror)
- NO_WCAST_ALIGN.clang (disables -Wcast-align)
- NO_WFORMAT.clang (disables -Wformat and friends)
- CLANG_NO_IAS (disables integrated assembler)
- CLANG_OPT_SMALL (adds flags for extra small size optimizations)
As a side effect, this enables setting CC/CXX/CPP in src.conf instead of
make.conf! For clang, use the following:
CC=clang
CXX=clang++
CPP=clang-cpp
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
| |
CFLAGS having '-g' in it, clang outputs several assembly directives that
are too new for our version of binutils.
Therefore, assemble the resulting .s files with clang instead. A more
general solution can be implemented when a GNU as-compatible driver for
clang's integrated assembler appears.
Reported by: dougb
|
|
|
|
|
|
| |
some more bytes from the final boot2 image.
Submitted by: rdivacky
|
| |
|
|
|
|
|
|
|
|
|
| |
boot2 calls back into boot1 to perform disk reads. The ZFS MBR boot blocks
do not have the same space constraints, so remove this hack for ZFS.
While here, remove commented out code to support C/H/S addressing from
zfsldr. The ZFS and GPT bootstraps always just use EDD LBA addressing.
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
| |
This modifies CFLAGS and tweaks sio.S to use the new calling convention.
The sio_init() and sio_putc() prototypes are modified so that other
users of this code know the correct calling convention.
This makes the code smaller when compiled with clang.
Reviewed by: jhb
Tested by: me and Freddie Cash <fjwcash gmail com>
|
|
|
|
|
|
|
| |
under sys/boot/{i386,pc98}, since these are already added via
sys/boot/{i386,pc98}/Makefile.inc.
Submitted by: arundel
|
|
|
|
|
|
|
|
|
|
|
|
| |
and sys/boot/pc98/boot2, do not simply assign 'gcc' to CC, since compile
flags are sometimes passed via this variable, for example during the
build32 stage on amd64. This caused the 32-bit libobjc build on amd64
to fail.
Instead, only replace the first instance of clang (if any, including
optional path) with gcc, and leave the arguments alone.
Approved-by: rpaulo (mentor)
|
|
|
|
|
|
|
| |
gnu/lib/libobjc and sys/boot/i386/boot2, so it also works when using
absolute paths and/or options, as in CC="/absolute/path/clang -foo".
Approved by: rpaulo (mentor)
|
| |
|
|
|
|
|
|
|
| |
problems compiling it, but it just gets too big at the moment, even
with -Os. This is not applicable to gptboot, though.
Submitted by: Dimitry Andric <dimitry at andric.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the disklabel in the 2nd sector for boot code. Even with both UFS1
and UFS2 supported, there's enough bytes left that we don't have to
nibble from the disklabel.
Thus, the entire 2nd sector is now reserved for the disklabel, which
makes the bootcode compatible again with disklabels that have more
than 8 partitions -- such as those created and supported by gpart.
i386: 135 bytes available
amd64: 151 bytes available
Ok'd by: jhb
|
|
|
|
| |
we declared as inline can not be inlined.
|
| |
|
|
|
|
|
|
| |
I think all we really need is -fno-sse2.
I really don't like cluttering up the compiler invocation,
but this bigger hammer will fix reported problems for now.
|
|
|
|
| |
naming of other boot-related make vars.
|
|
|
|
| |
breaks boot in spectacular ways otherwise.
|
|
|
|
| |
Repocopied by: joe
|
|
|
|
|
|
|
|
|
|
|
| |
- Now that bsd.prog.mk deals with programs linked with -nostdlib
better, and has a notion of an "internal" program, use PROG
where possible. This has a good impact on the contents of
.depend files and causes programs to be linked with cc(1).
XXX: boot2 couldn't be converted as it's actually two programs.
Tested on: i386, amd64
|
|
|
|
| |
Reported by: kris
|
|
|
|
| |
- Removed -ffreestanding; it's enforced by ../Makefile.inc.
|
| |
|
|
|
|
| |
Tested on: amd64 (sledge)
|
|
|
|
|
|
|
|
|
|
|
|
| |
- do not use PROG for what's not a real C program,
- use sys.mk transformation rules where possible,
- only create the "machine" symlink on AMD64,
- removed MAINTAINER lines in individual makefiles,
- added the LIBSTAND defitinion to <bsd.libnames.mk>,
- somewhat better contents in .depend files.
Tested on: i386, amd64
Prodded by: bde
|
| |
|
| |
|
|
|
|
| |
Submitted by: cron
|
|
|
|
|
| |
There is little if any reason to treat the two components separately
and it will simplify disklabel(8) and libdisk if we didn't.
|
|
|
|
| |
that it does here.
|
|
|
|
|
|
|
|
|
| |
the last second before the commit.
# likely we can remove this hack now that gcc generates better aligned code
# in the align to word case.
Noticed by: bde
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
subset of Peter's patchs that are believed to be safe.
Makefile tweaks:
o -fomit-frame-pointer
o Change default to building both UFS1 and UFS2 bootblocks.
Lots of boot2 tweaks:
o lookup is only ever called with kname, so use it directly.
o inline memsize
o getstr are only ever called with cmd, so hardware that.
o tweaks to the parsing code to test after the conversion rather than
before since we tested after anyways.
o eliminate support for %x in printf.
o eliminate a few bytes in printfs.
o Tweak the boot banner.
o eliminate support for wd and " " devices (I might add wd back to
keep bde happy).
o eliminate support for a few arguments.
This takes us from -162 bytes free to 67 bytes free.
I've tested this only on a few systems, so be careful when updating to
this change.
Submitted by: peter, imp, ian
|
|
|
|
|
|
|
|
|
|
| |
it possible to make UFS1_ONLY and UFS2_ONLY versions which fit inside the
traditional 16 sectors.
Remove assorted now unneeded hackery.
UFS1_AND_UFS2 still needs another 150 bytes to work, and that is probably
not within our reach, ever.
|
|
|
|
|
|
|
| |
to run at 0xc000 by changing its virtual start address from 0x1000 to
0x2000.
Tested by: phk
|
|
|
|
|
|
| |
don't bother with libkern.
Sponsored by: DARPA & NAI Labs.
|
|
|
|
|
| |
also improves the "random undocumented offsets into various memory
spaces" a little bit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
work as advertised:
bang# pwd
/bang/src/sys/boot/i386/boot2
bang# make clean >& /dev/null
bang# cvs -q update -r 1.35 Makefile >& /dev/null
bang# make >& /dev/null
bang# cat /usr/obj/`pwd`/boot2.h
#define XREADORG 0x725
bang# cvs -q update -r 1.36 Makefile > & /dev/null
bang# make clean > & /dev/null
bang# make > & /dev/null
bang# cat /usr/obj/`pwd`/boot2.h
#define XREADORG 0x25
bang#
|
| |
|
|
|
|
|
|
|
|
| |
Conditionalize the "XX bytes left" checks reference on UFS1/UFS12.
Conditionally build the necessary 64bit math for boot2 if UFS12.
Sponsored by: DARPA & NAI Labs.
|
|
|
|
|
|
| |
it through CPP so we can conditionalized things.
Sponsored by: DARPA & NAI Labs
|
|
|
|
| |
Sponsored by: DARPA & NAI Labs.
|
|
|
|
|
|
| |
for a long time now.
Approved by: bde
|
|
|
|
| |
to libi386, this issue was resolved already in a cleaner way.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
filesystem expands the inode to 256 bytes to make space for 64-bit
block pointers. It also adds a file-creation time field, an ability
to use jumbo blocks per inode to allow extent like pointer density,
and space for extended attributes (up to twice the filesystem block
size worth of attributes, e.g., on a 16K filesystem, there is space
for 32K of attributes). UFS2 fully supports and runs existing UFS1
filesystems. New filesystems built using newfs can be built in either
UFS1 or UFS2 format using the -O option. In this commit UFS1 is
the default format, so if you want to build UFS2 format filesystems,
you must specify -O 2. This default will be changed to UFS2 when
UFS2 proves itself to be stable. In this commit the boot code for
reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c)
as there is insufficient space in the boot block. Once the size of the
boot block is increased, this code can be defined.
Things to note: the definition of SBSIZE has changed to SBLOCKSIZE.
The header file <ufs/ufs/dinode.h> must be included before
<ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and
ufs_lbn_t.
Still TODO:
Verify that the first level bootstraps work for all the architectures.
Convert the utility ffsinfo to understand UFS2 and test growfs.
Add support for the extended attribute storage. Update soft updates
to ensure integrity of extended attribute storage. Switch the
current extended attribute interfaces to use the extended attribute
storage. Add the extent like functionality (framework is there,
but is currently never used).
Sponsored by: DARPA & NAI Labs.
Reviewed by: Poul-Henning Kamp <phk@freebsd.org>
|
| |
|
|
|
|
|
|
|
| |
Factor the ufs reading code out of the i386/boot2 loader so it can
be reused by for instance sparc64.
Sponsored by: DARPA and NAI Labs.
|