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)
385
385
$(INSTALL_HDR) $(src_dir)/$$file $(install_hdrs_dir)/`dirname $$file`; \
386
386
done
387
387
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
+
388
397
install-libs : $(install_libs )
389
398
$(MKINSTALLDIRS ) $(install_libs_dir )
390
399
for file in $^; \
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ mkdir install
11
11
CXXFLAGS=" -Wnon-virtual-dtor" CFLAGS=" -Werror -Wignored-qualifiers -Wunused-function -Wunused-parameter -Wunused-variable" $DIR /../configure --prefix=` pwd` /install
12
12
make -j" $( nproc 2> /dev/null || sysctl -n hw.ncpu) "
13
13
make check
14
- make install
14
+ make install install-hdrs-list.h
15
15
16
16
# check that help message prints without error
17
17
install/bin/spike -h
Original file line number Diff line number Diff line change @@ -13,8 +13,11 @@ tar xf spike-ci.tar
13
13
time ../install/bin/spike --isa=rv64gc pk hello | grep " Hello, world! Pi is approximately 3.141588."
14
14
15
15
# 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
18
21
19
22
LD_LIBRARY_PATH=../install/lib ./test-libriscv pk hello| grep " Hello, world! Pi is approximately 3.141588."
20
23
LD_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 6
6
* Copyright (C) 2006 David Gibson, IBM Corporation.
7
7
*/
8
8
9
- #include < libfdt_env.h>
10
- #include < fdt.h>
9
+ #include " libfdt_env.h"
10
+ #include " fdt.h"
11
11
12
12
#define FDT_FIRST_SUPPORTED_VERSION 0x02
13
13
#define FDT_LAST_SUPPORTED_VERSION 0x11
Original file line number Diff line number Diff line change 3
3
#ifndef _RISCV_BYTEORDER_H
4
4
#define _RISCV_BYTEORDER_H
5
5
6
- #include " config.h"
7
6
#include < stdint.h>
7
+ #include < arpa/inet.h>
8
8
9
9
static inline uint8_t swap (uint8_t n) { return n; }
10
10
static 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)))
22
22
static inline int128_t swap (int128_t n) { return int128_t (swap (uint128_t (n))); }
23
23
#endif
24
24
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); }
36
30
37
31
// Wrapper to mark a value as target endian, to guide conversion code
38
32
Original file line number Diff line number Diff line change 4
4
#define _ELFLOADER_H
5
5
6
6
#include " elf.h"
7
+ #include " memif.h"
7
8
#include < map>
8
9
#include < string>
9
10
Original file line number Diff line number Diff line change 1
1
// See LICENSE for license details.
2
2
3
+ #include " config.h"
3
4
#include " cfg.h"
4
5
#include " mmu.h"
5
6
#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
1
5
2
6
#include < fstream>
3
7
#include < iostream>
@@ -116,3 +120,4 @@ class entropy_source {
116
120
117
121
};
118
122
123
+ #endif
Original file line number Diff line number Diff line change @@ -243,8 +243,3 @@ softfloat_test_srcs =
243
243
softfloat_install_hdrs = \
244
244
softfloat.h \
245
245
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