<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/Makefile, branch v1.0</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/Makefile?h=v1.0</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/Makefile?h=v1.0'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2021-12-16T03:57:22Z</updated>
<entry>
<title>Makefile: Improve the method to disable -m(no-)save-restore option</title>
<updated>2021-12-16T03:57:22Z</updated>
<author>
<name>Xiang W</name>
<email>wxjstz@126.com</email>
</author>
<published>2021-12-12T12:39:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=f27035981096e8d272d94dc17402b10567429869'/>
<id>urn:sha1:f27035981096e8d272d94dc17402b10567429869</id>
<content type='text'>
The commit 69d7e53 disables the -m(no-)save-restore option for
clang, but clang11 supports this option. This patch uses the
output information of the compiler to check whether the compiler
supports this option.

Signed-off-by: Xiang W &lt;wxjstz@126.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>Makefile: Fix -msave-restore compile warning with CLANG-10 (or lower)</title>
<updated>2021-12-11T12:07:26Z</updated>
<author>
<name>Anup Patel</name>
<email>anup.patel@wdc.com</email>
</author>
<published>2021-12-02T05:00:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=69d7e536138ae71a24028ca849d401a4d64d564b'/>
<id>urn:sha1:69d7e536138ae71a24028ca849d401a4d64d564b</id>
<content type='text'>
The riscv target of CLANG-10 (or lower) does not support the
-m(no-)save-restore option so we get compile warnings. This patch
fixes compile warning by using -m(no-)save-restore option only
for GCC.

Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Dong Du &lt;Dd_nirvana@sjtu.edu.cn&gt;
</content>
</entry>
<entry>
<title>Makefile: Add build time and compiler info string</title>
<updated>2021-10-20T09:40:52Z</updated>
<author>
<name>Wei Fu</name>
<email>wefu@redhat.com</email>
</author>
<published>2021-09-30T10:11:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=422eda499cd6b69c0ca9f4cb06b3aceef17a3b27'/>
<id>urn:sha1:422eda499cd6b69c0ca9f4cb06b3aceef17a3b27</id>
<content type='text'>
When we are doing opensbi development, we want to know the build time
and compiler info for debug purpose.

To enable this message, please add "BUILD_INFO=y", like:

```
make BUILD_INFO=y
```

NOTE: Using `BUILD_INFO=y` without specifying SOURCE_DATE_EPOCH will
violate "reproducible builds". So it's ONLY for development and debug
purpose, and should NOT be used in a product which follows "reproducible
builds".

Signed-off-by: Wei Fu &lt;wefu@redhat.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Reviewed-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
</content>
</entry>
<entry>
<title>Makefile: Manually forward RELAX_FLAG to the assembler when linking with LLD</title>
<updated>2021-07-27T08:59:31Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2021-07-12T02:12:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=989039117fc0181bb971acf2c934d3fba454c153'/>
<id>urn:sha1:989039117fc0181bb971acf2c934d3fba454c153</id>
<content type='text'>
When generating code with -mno-relax, GCC puts .option norelax in
the generated assembly, and so doesn’t bother passing on -mno-relax
to the assembler. This has the unfortunate effect that, when using
GCC to assemble hand-written assembly, -mno-relax does nothing,
and we have to pass -Wa,-mno-relax to manually forward it to the
assembler.

This is an old GCC bug that was fixed [1] recently. For the time
being, let's pass "-Wa,-mno-relax" to ASFLAGS for the GCC + LLD
combination to work, e.g.:

  $ make CC=riscv64-unknown-elf-gcc LLVM=1 PLATFORM=generic

[1] https://github.com/gcc-mirror/gcc/commit/3b0a7d624e64eeb81e4d5e8c62c46d86ef521857

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>lib: utils: Drop dependency on libgcc by importing part of FreeBSD's libquad</title>
<updated>2021-07-11T15:31:44Z</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@jrtc27.com</email>
</author>
<published>2021-07-11T02:28:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=17729d44daf879e015950b0e9636afceefea0a59'/>
<id>urn:sha1:17729d44daf879e015950b0e9636afceefea0a59</id>
<content type='text'>
We only need libgcc for 64-bit division on RV32. Whilst GCC toolchains
bundle libgcc, Clang toolchains tend not to ship libclang_rt.builtins
given every compiler is a cross-compiler for every target and so you
would need a silly number of builds of it, with only the native library
available; only vendor-provided Clang toolchains specifically for bare
metal cross-compiling are likely to provide it.

Thus, import part of FreeBSD's implementation of the division support
functions needed and stop linking against libgcc.

Signed-off-by: Jessica Clarke &lt;jrtc27@jrtc27.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Tested-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>Makefile: Support building with Clang and LLVM binutils</title>
<updated>2021-07-11T14:52:55Z</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@jrtc27.com</email>
</author>
<published>2021-07-11T02:28:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=2942777425516f7b31181fbaecc5485263dfcb01'/>
<id>urn:sha1:2942777425516f7b31181fbaecc5485263dfcb01</id>
<content type='text'>
This is intended to mirror the Linux kernel. Building with CC=clang will
use Clang as the compiler but default to using the existing binutils.
Building with LLVM=1 will default to using Clang and LLVM binutils.

Whilst GCC will accept the -N linker option and forward it on to the
linker, Clang will not, and so in order to support both compilers we
must use -Wl, to forward it to the linker as is required for most other
linker options.

Note that there is currently a bug when using Clang as the compiler and
riscv64-linux-gnu-ld as the linker for FW_PIC=y. At first glance this
appears to be a bug in GNU binutils, but this could also be Clang or
OpenSBI at fault in some subtle way. Thus, for now, advise that this
combination be avoided.

Signed-off-by: Jessica Clarke &lt;jrtc27@jrtc27.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
Tested-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>firmware: Only default FW_PIC to y if supported</title>
<updated>2021-07-11T14:33:06Z</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@jrtc27.com</email>
</author>
<published>2021-07-11T02:28:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=09ad811ec4661b99a67b87f28c93177367ae911e'/>
<id>urn:sha1:09ad811ec4661b99a67b87f28c93177367ae911e</id>
<content type='text'>
Bare-metal GNU ld does not support PIE, so if using it this will result
in a failure to build. Instead, default to FW_PIC=n if not supported.
Note that an explicit FW_PIC=y is not overridden, to ensure the build
fails rather than silently producing a position-dependent binary.

Signed-off-by: Jessica Clarke &lt;jrtc27@jrtc27.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>Makefile: unconditionally disable SSP</title>
<updated>2021-05-19T11:07:50Z</updated>
<author>
<name>Fabrice Fontaine</name>
<email>fontaine.fabrice@gmail.com</email>
</author>
<published>2021-05-15T08:16:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=6139ab272b1e69e4ff8a37655969c877ae86de49'/>
<id>urn:sha1:6139ab272b1e69e4ff8a37655969c877ae86de49</id>
<content type='text'>
Though -nostdlib is passed in CFLAGS, -fno-stack-protector must also be
passed to avoid linking errors related to undefined references to
'__stack_chk_guard' and '__stack_chk_fail' if toolchain enforces
-fstack-protector.

Fixes:
 - https://gitlab.com/kubu93/buildroot/-/jobs/1247043359

Signed-off-by: Fabrice Fontaine &lt;fontaine.fabrice@gmail.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Xiang W &lt;wxjstz@126.com&gt;
</content>
</entry>
<entry>
<title>include: headers: Replace __ASSEMBLY__ with __ASSEMBLER__</title>
<updated>2021-03-22T10:32:48Z</updated>
<author>
<name>Marouene Boubakri</name>
<email>marouene.boubakri@nxp.com</email>
</author>
<published>2021-03-12T11:00:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=bfc85c70e7517dc633b74e33768247b4df6a661c'/>
<id>urn:sha1:bfc85c70e7517dc633b74e33768247b4df6a661c</id>
<content type='text'>
GCC has already a predefined macro __ASSEMBLER__ therefore, it can be
used without the need to define a new flag with -D__ASSEMBLY__.
This is useful when adding the library to projects having a build
system such one can build without the need to make changes.
THe build system does not use the Makefile in the sources tree.

Signed-off-by: Marouene Boubakri &lt;marouene.boubakri@nxp.com&gt;
Signed-off-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
<entry>
<title>firmware: Support position independent execution</title>
<updated>2021-03-19T09:30:50Z</updated>
<author>
<name>Vincent Chen</name>
<email>vincent.chen@sifive.com</email>
</author>
<published>2021-03-17T01:16:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=0f20e8adcf42d31bc478d6700b625d00a68cb30e'/>
<id>urn:sha1:0f20e8adcf42d31bc478d6700b625d00a68cb30e</id>
<content type='text'>
Enable OpenSBI to support position independent execution. Because the
position independent code will cause an additional GOT reference when
accessing the global variables, it will reduce performance a bit. Therefore,
the position independent execution is disabled by default. Users can
through specifying "FW_PIC=y" on the make command to enable this feature.

In theory, after enabling position-independent execution, the OpenSBI
can run at arbitrary address with appropriate alignment. Therefore, the
original relocation mechanism will be skipped. In other words, OpenSBI will
directly run at the load address without any code movement.

Signed-off-by: Vincent Chen &lt;vincent.chen@sifive.com&gt;
Reviewed-by: Anup Patel &lt;anup.patel@wdc.com&gt;
</content>
</entry>
</feed>
