Skip to content

Commit

Permalink
Merge pull request #123 from hannesm/no-ld
Browse files Browse the repository at this point in the history
remove LD hacks
  • Loading branch information
mato committed Nov 22, 2016
2 parents 84763e1 + a39d7f6 commit 7f78e69
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 20 deletions.
1 change: 0 additions & 1 deletion Makefile
Expand Up @@ -59,7 +59,6 @@ OPAM_VIRTIO_INCDIR=$(PREFIX)/include/solo5-kernel-virtio/include
%.pc: %.pc.in
sed <$< > $@ \
-e 's#!CFLAGS!#$(MD_CFLAGS)#g;' \
-e 's#!LD!#$(LD)#g;' \
-e 's#!LDFLAGS!#$(LDFLAGS)#g;'

.PHONY: opam-virtio-install
Expand Down
10 changes: 6 additions & 4 deletions Makefile.common
@@ -1,12 +1,14 @@
# Be clear about some common programs we use!
AS=as
CC=cc
LD=ld
OBJCOPY=objcopy

# This Makefile defines global defaults for building Solo5 (kernel/) and the
# in-tree test programs. These can be overriden either on the command line, or
# via Makeconf generated by configure.sh.
include $(TOP)/Makeconf

AS=as
CC=cc
LD=ld
OBJCOPY=objcopy
# Exported to OPAM via pkg-config.
MD_CFLAGS=$(HOST_CFLAGS) -ffreestanding -mno-red-zone -mno-3dnow
# Likewise.
Expand Down
13 changes: 0 additions & 13 deletions configure.sh
Expand Up @@ -16,11 +16,6 @@ cc_is_gcc()
${CC:-cc} -v 2>&1 | grep -q "^gcc version"
}

check_ld_version()
{
type $1 >/dev/null 2>&1 && $1 -v | grep -q 'GNU.*2.2[5-9]'
}

# Host-provided header files are installed here for in-tree builds. OPAM will
# install these to $(OPAM_INCDIR)/host where they will be picked up by
# pkg-config.
Expand Down Expand Up @@ -63,13 +58,6 @@ case $(uname -s) in
HOST_CFLAGS="-nostdlibinc"
BUILD_UKVM=
BUILD_VIRTIO="yes"
# Check that the linker is new enough. Allow the user to explicitly
# override ${LD}; if unset default to looking for the binutils one.
LD=${LD:-/usr/local/bin/ld}
check_ld_version ${LD} || \
die "Linker '${LD}': Not found or too old (< 2.25)." \
"Please install ld from 'binutils' or set \$LD explicitly."
EXTRA="LD=${LD}"
;;
*)
die "Unsupported build OS: $(uname -s)"
Expand All @@ -80,5 +68,4 @@ cat <<EOM >Makeconf
BUILD_UKVM=${BUILD_UKVM}
BUILD_VIRTIO=${BUILD_VIRTIO}
HOST_CFLAGS=${HOST_CFLAGS}
${EXTRA}
EOM
1 change: 0 additions & 1 deletion solo5-kernel-ukvm.pc.in
Expand Up @@ -2,7 +2,6 @@ prefix=${pcfiledir}/../..
exec_prefix=${prefix}
includedir=${prefix}/include/solo5-kernel-ukvm/include
libdir=${exec_prefix}/lib/solo5-kernel-ukvm
ld=!LD!
ldflags=!LDFLAGS! -T ${libdir}/solo5.lds ${libdir}/solo5.o

Name: solo5-kernel-ukvm
Expand Down
1 change: 0 additions & 1 deletion solo5-kernel-virtio.pc.in
Expand Up @@ -2,7 +2,6 @@ prefix=${pcfiledir}/../..
exec_prefix=${prefix}
includedir=${prefix}/include/solo5-kernel-virtio/include
libdir=${exec_prefix}/lib/solo5-kernel-virtio
ld=!LD!
ldflags=!LDFLAGS! -T ${libdir}/solo5.lds ${libdir}/solo5.o

Name: solo5-kernel-virtio
Expand Down

0 comments on commit 7f78e69

Please sign in to comment.