Skip to content

Commit

Permalink
libgloss: merge microblaze into top-level Makefile
Browse files Browse the repository at this point in the history
Avoid a recursive make to speed things up a bit.
A microblaze-elf build shows installed objects & libs produce same code.
  • Loading branch information
vapier committed Dec 31, 2023
1 parent d02e94a commit 13a24be
Show file tree
Hide file tree
Showing 6 changed files with 473 additions and 331 deletions.
3 changes: 3 additions & 0 deletions libgloss/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ endif
if CONFIG_MCORE
include mcore/Makefile.inc
endif
if CONFIG_MICROBLAZE
include microblaze/Makefile.inc
endif
if CONFIG_MN10200
include mn10200/Makefile.inc
endif
Expand Down
536 changes: 362 additions & 174 deletions libgloss/Makefile.in

Large diffs are not rendered by default.

19 changes: 15 additions & 4 deletions libgloss/configure
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,8 @@ CONFIG_MN10300_FALSE
CONFIG_MN10300_TRUE
CONFIG_MN10200_FALSE
CONFIG_MN10200_TRUE
CONFIG_MICROBLAZE_FALSE
CONFIG_MICROBLAZE_TRUE
CONFIG_MCORE_FALSE
CONFIG_MCORE_TRUE
CONFIG_M32R_FALSE
Expand Down Expand Up @@ -2930,9 +2932,7 @@ case "${target}" in
config_moxie=true
;;
microblaze*-*-*)
ac_config_files="$ac_config_files microblaze/Makefile"
subdirs="$subdirs microblaze"
config_microblaze=true
;;
mt-*-*)
ac_config_files="$ac_config_files mt/Makefile"
Expand Down Expand Up @@ -3141,6 +3141,14 @@ else
CONFIG_MCORE_FALSE=
fi
if test x$config_microblaze = xtrue; then
CONFIG_MICROBLAZE_TRUE=
CONFIG_MICROBLAZE_FALSE='#'
else
CONFIG_MICROBLAZE_TRUE='#'
CONFIG_MICROBLAZE_FALSE=
fi
if test x$config_mn10200 = xtrue; then
CONFIG_MN10200_TRUE=
CONFIG_MN10200_FALSE='#'
Expand Down Expand Up @@ -5845,6 +5853,10 @@ if test -z "${CONFIG_MCORE_TRUE}" && test -z "${CONFIG_MCORE_FALSE}"; then
as_fn_error $? "conditional \"CONFIG_MCORE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${CONFIG_MICROBLAZE_TRUE}" && test -z "${CONFIG_MICROBLAZE_FALSE}"; then
as_fn_error $? "conditional \"CONFIG_MICROBLAZE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${CONFIG_MN10200_TRUE}" && test -z "${CONFIG_MN10200_FALSE}"; then
as_fn_error $? "conditional \"CONFIG_MN10200\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
Expand Down Expand Up @@ -6586,7 +6598,6 @@ do
"cris/Makefile") CONFIG_FILES="$CONFIG_FILES cris/Makefile" ;;
"crx/Makefile") CONFIG_FILES="$CONFIG_FILES crx/Makefile" ;;
"mep/Makefile") CONFIG_FILES="$CONFIG_FILES mep/Makefile" ;;
"microblaze/Makefile") CONFIG_FILES="$CONFIG_FILES microblaze/Makefile" ;;
"mt/Makefile") CONFIG_FILES="$CONFIG_FILES mt/Makefile" ;;
"xc16x/Makefile") CONFIG_FILES="$CONFIG_FILES xc16x/Makefile" ;;
"m32c/Makefile") CONFIG_FILES="$CONFIG_FILES m32c/Makefile" ;;
Expand Down
5 changes: 2 additions & 3 deletions libgloss/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ case "${target}" in
config_moxie=true
;;
microblaze*-*-*)
AC_CONFIG_FILES([microblaze/Makefile])
subdirs="$subdirs microblaze"
config_microblaze=true
;;
mt-*-*)
AC_CONFIG_FILES([mt/Makefile])
Expand Down Expand Up @@ -227,7 +226,7 @@ dnl the ports above will too!
m4_foreach_w([SUBDIR], [
aarch64 arc arm bfin csky d30v epiphany fr30 frv ft32 i386 i960 iq2000
libnosys lm32
m32r mcore mn10200 mn10300 moxie msp430
m32r mcore microblaze mn10200 mn10300 moxie msp430
nds32 nios2 or1k riscv rl78 rx sparc sparc_leon tic6x v850 visium wince
xstormy16 xtensa
], [dnl
Expand Down
150 changes: 0 additions & 150 deletions libgloss/microblaze/Makefile.in

This file was deleted.

91 changes: 91 additions & 0 deletions libgloss/microblaze/Makefile.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
## Copyright 2007, 2009 Xilinx, Inc. All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are
## met:
##
## 1. Redistributions source code must retain the above copyright notice,
## this list of conditions and the following disclaimer.
##
## 2. Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in the
## documentation and/or other materials provided with the distribution.
##
## 3. Neither the name of Xilinx nor the names of its contributors may be
## used to endorse or promote products derived from this software without
## specific prior written permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS
## IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
## TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
## PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
## HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
## TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
## LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
## NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
## SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

if !HAVE_MULTISUBDIR
multilibtool_DATA += \
%D%/xilinx.ld
endif
multilibtool_DATA += \
%D%/elf-gloss-linux.specs

multilibtool_DATA += \
%D%/crt0.o \
%D%/crt1.o \
%D%/crt2.o \
%D%/crt3.o \
%D%/crt4.o \
%D%/crtinit.o \
%D%/pgcrtinit.o \
%D%/sim-crtinit.o \
%D%/sim-pgcrtinit.o \
%D%/linux-crt0.o
libobjs_a_SOURCES += \
%D%/crt0.S \
%D%/crt1.S \
%D%/crt2.S \
%D%/crt3.S \
%D%/crt4.S \
%D%/crtinit.S \
%D%/pgcrtinit.S \
%D%/sim-crtinit.S \
%D%/sim-pgcrtinit.S \
%D%/linux-crt0.S

multilibtool_LIBRARIES += %D%/libgloss.a
%C%_libgloss_a_SOURCES = \
fstat.c \
getpid.c \
isatty.c \
kill.c \
lseek.c \
print.c \
putnum.c \
stat.c \
unlink.c \
open.c \
close.c \
read.c \
write.c \
%D%/sbrk.c \
%D%/timer.c \
%D%/_exception_handler.S \
%D%/_hw_exception_handler.S \
%D%/_interrupt_handler.S \
%D%/_program_clean.S \
%D%/_program_init.S \
%D%/xil_malloc.c \
%D%/xil_sbrk.c \
%D%/xil_printf.c

multilibtool_LIBRARIES += %D%/libgloss-linux.a
%C%_libgloss_linux_a_SOURCES = \
%D%/linux-syscalls.S \
%D%/linux-syscalls-wrap.c \
%D%/linux-outbyte.c \
%D%/linux-inbyte.c

0 comments on commit 13a24be

Please sign in to comment.