File tree Expand file tree Collapse file tree 11 files changed +106
-17
lines changed Expand file tree Collapse file tree 11 files changed +106
-17
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,11 @@ $(1)_build_env+=$($(1)_build_env_$(host_arch)) $($(1)_build_env_$(host_arch)_$(r
146
146
$(1 ) _build_env+=$($(1 ) _build_env_$(host_os ) ) $($(1 ) _build_env_$(host_os ) _$(release_type ) )
147
147
$(1 ) _build_env+=$($(1 ) _build_env_$(host_arch ) _$(host_os ) ) $($(1 ) _build_env_$(host_arch ) _$(host_os ) _$(release_type ) )
148
148
149
+ $(1 ) _stage_env+=$$($(1 ) _stage_env_$(release_type ) )
150
+ $(1 ) _stage_env+=$($(1 ) _stage_env_$(host_arch ) ) $($(1 ) _stage_env_$(host_arch ) _$(release_type ) )
151
+ $(1 ) _stage_env+=$($(1 ) _stage_env_$(host_os ) ) $($(1 ) _stage_env_$(host_os ) _$(release_type ) )
152
+ $(1 ) _stage_env+=$($(1 ) _stage_env_$(host_arch ) _$(host_os ) ) $($(1 ) _stage_env_$(host_arch ) _$(host_os ) _$(release_type ) )
153
+
149
154
$(1 ) _config_env+=PKG_CONFIG_LIBDIR=$($($(1 ) _type) _prefix) /lib/pkgconfig
150
155
$(1 ) _config_env+=PKG_CONFIG_PATH=$($($(1 ) _type) _prefix) /share/pkgconfig
151
156
$(1 ) _config_env+=PATH="$(build_prefix ) /bin:$(PATH ) "
Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ clangxx_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang++")
3
3
4
4
freebsd_CC =env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
5
5
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
6
- -u LIBRARY_PATH $(clang_prog ) --target=$(host ) --sysroot=$(host_prefix ) /native -iwithsysroot/usr/include
6
+ -u LIBRARY_PATH $(clang_prog ) --target=$(host ) --sysroot=$(host_prefix ) /native/toolchain -iwithsysroot/usr/include
7
7
freebsd_CXX =env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
8
8
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
9
- -u LIBRARY_PATH $(clangxx_prog ) --target=$(host ) -stdlib=libc++ --sysroot=$(host_prefix ) /native \
9
+ -u LIBRARY_PATH $(clangxx_prog ) --target=$(host ) -stdlib=libc++ --sysroot=$(host_prefix ) /native/toolchain \
10
10
-iwithsysroot/usr/include/c++/v1 -iwithsysroot/usr/include
11
11
12
12
freebsd_AR =ar
Original file line number Diff line number Diff line change
1
+ package =fcmp_pp_rust
2
+ $(package)_version =0.0.0
3
+ $(package)_download_path =
4
+ $(package)_file_name =fcmp_pp_rust.tar.gz
5
+ $(package)_sha256_hash =1fd2eaab44b4f7363df8a18897f17ce4728506b8c52c5590f9d634a9000a83fe
6
+ $(package)_dependencies =fcmp_pp_rust_deps rustc
7
+ $(package)_patches =cargo.config
8
+
9
+ # TODO: Unused, exists for testing purposes, delete later.
10
+
11
+ define $(package)_config_cmds
12
+ mkdir -p /home/user/.cargo && \
13
+ cp $($(package ) _patch_dir) /cargo.config /home/user/.cargo/config && \
14
+ sed -i "s/TARGET/${HOST}/g" /home/user/.cargo/config
15
+ endef
16
+
17
+ define $(package)_build_cmds
18
+ RUSTC="/monero/contrib/depends/${HOST}/native/bin/rustc" cargo build --target ${RUST_TARGET} --release
19
+ endef
20
+
21
+ define $(package)_stage_cmds
22
+ mkdir -p $($(package ) _staging_prefix_dir) /lib/ && \
23
+ cp ./target/${RUST_TARGET}/release/libfcmp_pp_rust.* $($(package ) _staging_prefix_dir) /lib/
24
+ endef
Original file line number Diff line number Diff line change 1
1
package =freebsd_base
2
- $(package)_version =11 .3
3
- $(package)_download_path =https://download.freebsd .org/ftp/releases/amd64/ $( $( package ) _version) -RELEASE/
4
- $(package)_download_file =base.txz
2
+ $(package)_version =12 .3
3
+ $(package)_download_path =https://ci-mirrors.rust-lang .org/rustc
4
+ $(package)_download_file =2022-05-06-freebsd- $( $( package ) _version) -amd64- base.txz
5
5
$(package)_file_name =freebsd-base-$($(package ) _version) .txz
6
- $(package)_sha256_hash =4599023ac136325b86f2fddeec64c1624daa83657e40b00b2ef944c81463a4ff
6
+ $(package)_sha256_hash =e85b256930a2fbc04b80334106afecba0f11e52e32ffa197a88d7319cf059840
7
+ $(package)_patches =setup.sh
7
8
8
9
define $(package)_extract_cmds
9
10
echo $($(package ) _sha256_hash) $($(1 ) _source_dir) /$($(package ) _file_name) | sha256sum -c &&\
10
11
tar xf $($(1 ) _source_dir) /$($(package ) _file_name) ./lib/ ./usr/lib/ ./usr/include/
11
12
endef
12
13
14
+ define $(package)_config_cmds
15
+ env host_prefix="$(host_prefix ) " bash $($(package ) _patch_dir) /setup.sh
16
+ endef
17
+
13
18
define $(package)_stage_cmds
14
- mkdir $($(package ) _staging_dir) /$(host_prefix ) /native &&\
19
+ mkdir -p $($(package ) _staging_dir) /$(host_prefix ) /native/toolchain &&\
15
20
rm -rf usr/include/openssl &&\
16
- mv lib usr $($(package ) _staging_dir) /$(host_prefix ) /native
21
+ mv lib usr $($(package ) _staging_dir) /$(host_prefix ) /native/toolchain &&\
22
+ mv bin $($(package ) _staging_dir) /$(host_prefix ) /native/
17
23
endef
Original file line number Diff line number Diff line change
1
+ package =native_binutils
2
+ $(package)_version =2.40
3
+ $(package)_download_path =https://ftp.gnu.org/gnu/binutils
4
+ $(package)_file_name =binutils-$($(package ) _version) .tar.bz2
5
+ $(package)_sha256_hash =f8298eb153a4b37d112e945aa5cb2850040bcf26a3ea65b5a715c83afe05e48a
6
+
7
+ define $(package)_config_cmds
8
+ $($(package ) _autoconf) --target="x86_64-unknown-freebsd11" --with-sysroot="$(host_prefix ) /native/toolchain"
9
+ endef
10
+
11
+ define $(package)_build_cmds
12
+ $(MAKE )
13
+ endef
14
+
15
+ define $(package)_stage_cmds
16
+ $(MAKE ) DESTDIR=$($(package ) _staging_dir) install
17
+ endef
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ darwin_native_packages = $(hardware_native_packages)
11
11
darwin_packages = ncurses readline $(hardware_packages )
12
12
13
13
# not really native...
14
- freebsd_native_packages = freebsd_base $(hardware_native_packages )
14
+ freebsd_native_packages = native_binutils freebsd_base $(hardware_native_packages )
15
15
freebsd_packages = ncurses readline protobuf libusb
16
16
17
17
linux_packages = eudev ncurses readline $(hardware_packages )
Original file line number Diff line number Diff line change @@ -4,8 +4,12 @@ $(package)_download_path=https://static.rust-lang.org/dist
4
4
$(package)_file_name =rustc-$($(package ) _version) -src.tar.gz
5
5
$(package)_sha256_hash =ee106e4c569f52dba3b5b282b105820f86bd8f6b3d09c06b8dce82fb1bb3a4a1
6
6
$(package)_patches =config.toml
7
+ $(package)_freebsd_dependencies =freebsd_base native_binutils
7
8
8
9
define $(package)_set_vars
10
+ $(package ) _stage_env_freebsd=AR_x86_64_unknown_freebsd=x86_64-unknown-freebsd11-ar
11
+ $(package ) _stage_env_freebsd+=CC_x86_64_unknown_freebsd=x86_64-unknown-freebsd11-clang
12
+ $(package ) _stage_env_freebsd+=CXX_x86_64_unknown_freebsd=x86_64-unknown-freebsd11-clang++
9
13
endef
10
14
11
15
define $(package)_config_cmds
@@ -26,10 +30,6 @@ define $(package)_preprocess_cmds
26
30
sed -i "s# PREFIX#$($(package)_staging_prefix_dir)#g" config.toml
27
31
endef
28
32
29
- define $(package)_build_cmd
30
- python3 ./x.py build
31
- endef
32
-
33
33
define $(package)_stage_cmds
34
34
python3 ./x.py install
35
35
endef
Original file line number Diff line number Diff line change
1
+ [source.crates-io]
2
+ replace-with = "vendored-sources"
3
+
4
+ [source."git+https://github.com/kayabaNerve/crypto-bigint?branch=c-repr"]
5
+ git = "https://github.com/kayabaNerve/crypto-bigint"
6
+ branch = "c-repr"
7
+ replace-with = "vendored-sources"
8
+
9
+ [source."git+https://github.com/kayabaNerve/fcmp-plus-plus"]
10
+ git = "https://github.com/kayabaNerve/fcmp-plus-plus"
11
+ replace-with = "vendored-sources"
12
+
13
+ [source.vendored-sources]
14
+ directory = "/monero/contrib/depends/TARGET/native/cargo"
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ mkdir bin
4
+
5
+ triple=x86_64-unknown-freebsd11
6
+
7
+ for tool in clang clang++; do
8
+ tool_path=bin/${triple} -${tool}
9
+ cat > " $tool_path " << EOF
10
+ #!/bin/sh
11
+ exec env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
12
+ -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
13
+ -u LIBRARY_PATH \
14
+ $tool --sysroot=${host_prefix} /native/toolchain --prefix=${host_prefix} /native/toolchain/bin "\$ @" --target=${triple}
15
+ EOF
16
+ chmod +x " $tool_path "
17
+ done
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ target = [ "x86_64-unknown-linux-gnu", "TARGET"]
9
9
cargo = " /home/user/.guix-profile/bin/cargo"
10
10
rustc = " /home/user/.guix-profile/bin/rustc"
11
11
12
+ compiler-docs = false
13
+
12
14
optimized-compiler-builtins = false
13
15
14
16
docs = false
You can’t perform that action at this time.
0 commit comments