File tree Expand file tree Collapse file tree 10 files changed +30
-22
lines changed Expand file tree Collapse file tree 10 files changed +30
-22
lines changed Original file line number Diff line number Diff line change @@ -385,6 +385,15 @@ install-hdrs : $(install_hdrs)
385385 $(INSTALL_HDR) $(src_dir)/$$file $(install_hdrs_dir)/`dirname $$file`; \
386386 done
387387
388+ install-hdrs-list.h : $(install_hdrs )
389+ rm -f $@ .tmp
390+ for file in $( subst $( src_dir) /,,$^) ; \
391+ do \
392+ $(MKINSTALLDIRS ) $(install_hdrs_dir ) /` dirname $$ file` ; \
393+ echo " #include <$( src_dir) /$$ file>" >> $@ .tmp; \
394+ done
395+ mv $@ .tmp $@
396+
388397install-libs : $(install_libs )
389398 $(MKINSTALLDIRS ) $(install_libs_dir )
390399 for file in $^; \
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ mkdir install
1111CXXFLAGS=" -Wnon-virtual-dtor" CFLAGS=" -Werror -Wignored-qualifiers -Wunused-function -Wunused-parameter -Wunused-variable" $DIR /../configure --prefix=` pwd` /install
1212make -j" $( nproc 2> /dev/null || sysctl -n hw.ncpu) "
1313make check
14- make install
14+ make install install-hdrs-list.h
1515
1616# check that help message prints without error
1717install/bin/spike -h
Original file line number Diff line number Diff line change @@ -13,8 +13,11 @@ tar xf spike-ci.tar
1313time ../install/bin/spike --isa=rv64gc pk hello | grep " Hello, world! Pi is approximately 3.141588."
1414
1515# check that including sim.h in an external project works
16- g++ -std=c++17 -I../install/include -L../install/lib $DIR /testlib.c -lriscv -o test-libriscv
17- g++ -std=c++17 -I../install/include -L../install/lib $DIR /test-customext.cc -lriscv -o test-customext
16+ g++ -std=c++2a -I../install/include -L../install/lib $DIR /testlib.cc -lriscv -o test-libriscv
17+ g++ -std=c++2a -I../install/include -L../install/lib $DIR /test-customext.cc -lriscv -o test-customext
18+
19+ # check that all installed headers are functional
20+ g++ -std=c++2a -I../install/include -L../install/lib $DIR /testlib.cc -lriscv -o /dev/null -include ../install-hdrs-list.h
1821
1922LD_LIBRARY_PATH=../install/lib ./test-libriscv pk hello| grep " Hello, world! Pi is approximately 3.141588."
2023LD_LIBRARY_PATH=../install/lib ./test-customext pk dummy-slliuw | grep " Executed successfully"
File renamed without changes.
Original file line number Diff line number Diff line change 66 * Copyright (C) 2006 David Gibson, IBM Corporation.
77 */
88
9- #include < libfdt_env.h>
10- #include < fdt.h>
9+ #include " libfdt_env.h"
10+ #include " fdt.h"
1111
1212#define FDT_FIRST_SUPPORTED_VERSION 0x02
1313#define FDT_LAST_SUPPORTED_VERSION 0x11
Original file line number Diff line number Diff line change 33#ifndef _RISCV_BYTEORDER_H
44#define _RISCV_BYTEORDER_H
55
6- #include " config.h"
76#include < stdint.h>
7+ #include < arpa/inet.h>
88
99static inline uint8_t swap (uint8_t n) { return n; }
1010static inline uint16_t swap (uint16_t n) { return (n >> 8 ) | (n << 8 ); }
@@ -22,17 +22,11 @@ static inline uint128_t swap(uint128_t n) { return (uint128_t(swap(uint64_t(n)))
2222static inline int128_t swap (int128_t n) { return int128_t (swap (uint128_t (n))); }
2323#endif
2424
25- #ifdef WORDS_BIGENDIAN
26- template <typename T> static inline T from_be (T n) { return n; }
27- template <typename T> static inline T to_be (T n) { return n; }
28- template <typename T> static inline T from_le (T n) { return swap (n); }
29- template <typename T> static inline T to_le (T n) { return swap (n); }
30- #else
31- template <typename T> static inline T from_le (T n) { return n; }
32- template <typename T> static inline T to_le (T n) { return n; }
33- template <typename T> static inline T from_be (T n) { return swap (n); }
34- template <typename T> static inline T to_be (T n) { return swap (n); }
35- #endif
25+ static inline bool is_be () { return htonl (1 ) == 1 ; }
26+ template <typename T> static inline T from_be (T n) { return is_be () ? n : swap (n); }
27+ template <typename T> static inline T to_be (T n) { return from_be (n); }
28+ template <typename T> static inline T from_le (T n) { return is_be () ? swap (n) : n; }
29+ template <typename T> static inline T to_le (T n) { return from_le (n); }
3630
3731// Wrapper to mark a value as target endian, to guide conversion code
3832
Original file line number Diff line number Diff line change 44#define _ELFLOADER_H
55
66#include " elf.h"
7+ #include " memif.h"
78#include < map>
89#include < string>
910
Original file line number Diff line number Diff line change 11// See LICENSE for license details.
22
3+ #include " config.h"
34#include " cfg.h"
45#include " mmu.h"
56#include " decode.h"
Original file line number Diff line number Diff line change 1+ // See LICENSE for license details.
2+
3+ #ifndef _RISCV_ENTROPY_SOURCE_H
4+ #define _RISCV_ENTROPY_SOURCE_H
15
26#include < fstream>
37#include < iostream>
@@ -116,3 +120,4 @@ class entropy_source {
116120
117121};
118122
123+ #endif
Original file line number Diff line number Diff line change @@ -243,8 +243,3 @@ softfloat_test_srcs =
243243softfloat_install_hdrs = \
244244 softfloat.h \
245245 softfloat_types.h \
246- primitives.h \
247- internals.h \
248- platform.h \
249- primitiveTypes.h \
250- specialize.h \
You can’t perform that action at this time.
0 commit comments