Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-gnome
Path: blob/main/lang/J/files/patch-make_build__tsdll.sh
16149 views
1
--- make/build_tsdll.sh.orig 2019-03-10 15:32:23 UTC
2
+++ make/build_tsdll.sh
3
@@ -1,9 +1,22 @@
4
#!/usr/local/bin/bash
5
# $1 is j32 or j64
6
-cd ~
7
+. make/jvars.sh
8
9
+compiler=${CC:0:3}
10
+
11
common=" -fPIC -O1 -Werror -Wextra -Wno-unused-parameter"
12
13
+if [ "x$compiler" = x'gcc' ] ; then
14
+OVER_GCC_VER7=$(echo `$CC -dumpversion | cut -f1 -d.` \>= 7 | bc)
15
+if [ $OVER_GCC_VER7 -eq 1 ] ; then
16
+common="$common -Wno-implicit-fallthrough"
17
+fi
18
+OVER_GCC_VER8=$(echo `$CC -dumpversion | cut -f1 -d.` \>= 8 | bc)
19
+if [ $OVER_GCC_VER8 -eq 1 ] ; then
20
+common="$common -Wno-cast-function-type"
21
+fi
22
+fi
23
+
24
case $jplatform\_$1 in
25
26
linux_j32)
27
@@ -35,6 +48,16 @@ darwin_j64)
28
TARGET=libtsdll.dylib
29
COMPILE="$common "
30
LINK=" -dynamiclib -o libtsdll.dylib "
31
+;;
32
+freebsd_j32)
33
+TARGET=libtsdll.so
34
+COMPILE="$common -m32 "
35
+LINK=" -shared -Wl,-soname,libtsdll.so -m32 -o libtsdll.so "
36
+;;
37
+freebsd_j64)
38
+TARGET=libtsdll.so
39
+COMPILE="$common "
40
+LINK=" -shared -Wl,-soname,libtsdll.so -o libtsdll.so "
41
;;
42
*)
43
echo no case for those parameters
44
45