Package: nim / 0.16.0-1

fix-gnu-kfreebsd.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
Description: Fix build for Debian GNU/kFreeBSD
 Don't use clang by default, then we can unconditionally pass -ldl -lm to GCC
Author: Ximin Luo <infinity0@debian.org>
Forwarded: not-needed
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/config/nim.cfg
+++ b/config/nim.cfg
@@ -104,7 +104,7 @@
   @end
 @end
 
-@if macosx or freebsd:
+@if macosx:
   cc = clang
   tlsEmulation:on
   gcc.options.always = "-w"
--- a/makefile
+++ b/makefile
@@ -5,7 +5,7 @@
 CC = gcc
 LINKER = gcc
 COMP_FLAGS = $(CPPFLAGS) $(CFLAGS) -w -O3 -fno-strict-aliasing
-LINK_FLAGS = $(LDFLAGS) 
+LINK_FLAGS = $(LDFLAGS) -ldl -lm
 binDir = bin
 
 koch := $(shell sh -c 'test -s ../koch.nim && echo "yes"')
@@ -13,126 +13,6 @@
 	binDir = ../bin
 endif
 
-ucpu := $(shell sh -c 'uname -m | tr "[:upper:]" "[:lower:]"')
-uos := $(shell sh -c 'uname | tr "[:upper:]" "[:lower:]"')
-
-ifeq ($(uos),linux)
-	myos = linux
-	LINK_FLAGS += -ldl -lm
-endif
-ifeq ($(uos),dragonfly)
-	myos = freebsd
-	LINK_FLAGS += -lm
-endif
-ifeq ($(uos),freebsd)
-	myos= freebsd
-	CC = clang
-	LINKER = clang
-	LINK_FLAGS += -lm
-endif
-ifeq ($(uos),openbsd)
-	myos = openbsd
-	LINK_FLAGS += -lm
-endif
-ifeq ($(uos),netbsd)
-	myos = netbsd
-	LINK_FLAGS += -lm
-endif
-ifeq ($(uos),darwin)
-	myos = macosx
-	CC = clang
-	LINKER = clang
-	LINK_FLAGS += -ldl -lm
-	ifeq ($HOSTTYPE,x86_64)
-		ucpu = amd64
-	endif
-endif
-ifeq ($(uos),aix)
-	myos = aix
-	LINK_FLAGS += -dl -lm
-endif
-ifeq ($(uos),solaris)
-	myos = solaris
-	LINK_FLAGS += -ldl -lm -lsocket -lnsl
-endif
-ifeq ($(uos),sun)
-	myos = solaris
-	LINK_FLAGS += -ldl -lm -lsocket -lnsl
-endif
-ifeq ($(uos),haiku)
-	myos = haiku
-endif
-ifndef uos
-	@echo "Error: unknown operating system: $(uos)"
-	@exit 1
-endif
-
-ifeq ($(ucpu),i386)
-	mycpu = i386
-endif
-ifeq ($(ucpu),i486)
-	mycpu = i386
-endif
-ifeq ($(ucpu),i586)
-	mycpu = i386
-endif
-ifeq ($(ucpu),i686)
-	mycpu = i386
-endif
-ifeq ($(ucpu),bepc)
-	mycpu = i386
-endif
-ifeq ($(ucpu),i86pc)
-	mycpu = i386
-endif
-ifeq ($(ucpu),amd64)
-	mycpu = amd64
-endif
-ifeq ($(ucpu),x86-64)
-	mycpu = amd64
-endif
-ifeq ($(ucpu),x86_64)
-	mycpu = amd64
-endif
-ifeq ($(ucpu),sparc)
-	mycpu = sparc
-endif
-ifeq ($(ucpu),sun)
-	mycpu = sparc
-endif
-ifeq ($(ucpu),ppc64)
-	mycpu = powerpc64
-	ifeq ($(myos),linux)
-		COMP_FLAGS += -m64
-		LINK_FLAGS += -m64
-	endif
-endif
-ifeq ($(ucpu),powerpc)
-	mycpu = powerpc
-endif
-ifeq ($(ucpu),ppc)
-	mycpu = ppc
-endif
-ifeq ($(ucpu),mips)
-	mycpu = mips
-endif
-ifeq ($(ucpu),arm)
-	mycpu = arm
-endif
-ifeq ($(ucpu),armeb)
-	mycpu = arm
-endif
-ifeq ($(ucpu),armel)
-	mycpu = arm
-endif
-ifeq ($(ucpu),armv6l)
-	mycpu = arm
-endif
-ifndef ucpu
-	@echo "Error: unknown processor : $(ucpu)"
-	@exit 1
-endif
-
 ifeq ($(myos),windows)
 	ifeq ($(mycpu),i386)
 		oFiles = c_code/1_1/compiler_nim.o c_code/1_1/stdlib_system.o c_code/1_1/compiler_commands.o c_code/1_1/stdlib_os.o c_code/1_1/stdlib_strutils.o c_code/1_1/stdlib_parseutils.o c_code/1_1/stdlib_math.o c_code/1_1/stdlib_algorithm.o c_code/1_1/stdlib_times.o c_code/1_1/stdlib_winlean.o c_code/1_1/stdlib_dynlib.o c_code/1_1/compiler_msgs.o c_code/1_1/compiler_options.o c_code/1_1/stdlib_tables.o c_code/1_1/compiler_ropes.o c_code/1_1/compiler_platform.o c_code/1_1/stdlib_terminal.o c_code/1_1/stdlib_macros.o c_code/1_1/compiler_lists.o c_code/1_1/stdlib_strtabs.o c_code/1_1/stdlib_osproc.o c_code/1_1/stdlib_sets.o c_code/1_1/stdlib_hashes.o c_code/1_1/stdlib_etcpriv.o c_code/1_1/stdlib_streams.o c_code/1_1/stdlib_cpuinfo.o c_code/1_1/compiler_nversion.o c_code/1_1/compiler_condsyms.o c_code/1_1/compiler_idents.o c_code/1_1/compiler_wordrecg.o c_code/1_1/compiler_extccomp.o c_code/1_1/stdlib_securehash.o c_code/1_1/stdlib_json.o c_code/1_1/stdlib_lexbase.o c_code/1_1/stdlib_unicode.o c_code/1_1/compiler_nimblecmd.o c_code/1_1/stdlib_parseopt.o c_code/1_1/compiler_lexer.o c_code/1_1/compiler_nimlexbase.o c_code/1_1/compiler_llstream.o c_code/1_1/compiler_nimconf.o c_code/1_1/compiler_main.o c_code/1_1/compiler_ast.o c_code/1_1/compiler_astalgo.o c_code/1_1/compiler_syntaxes.o c_code/1_1/compiler_renderer.o c_code/1_1/compiler_rodread.o c_code/1_1/compiler_rodwrite.o c_code/1_1/compiler_sem.o c_code/1_1/compiler_semdata.o c_code/1_1/compiler_passes.o c_code/1_1/compiler_docgen.o c_code/1_1/compiler_cgen.o c_code/1_1/compiler_jsgen.o c_code/1_1/compiler_importer.o c_code/1_1/compiler_passaux.o c_code/1_1/compiler_depends.o c_code/1_1/compiler_vm.o c_code/1_1/compiler_vmdef.o c_code/1_1/compiler_types.o c_code/1_1/compiler_idgen.o c_code/1_1/compiler_docgen2.o c_code/1_1/compiler_service.o c_code/1_1/compiler_parser.o c_code/1_1/compiler_modules.o c_code/1_1/compiler_ccgutils.o c_code/1_1/compiler_sigmatch.o c_code/1_1/compiler_modulegraphs.o c_code/1_1/stdlib_intsets.o c_code/1_1/compiler_rodutils.o c_code/1_1/compiler_pbraces.o c_code/1_1/compiler_filters.o c_code/1_1/compiler_filter_tmpl.o c_code/1_1/stdlib_memfiles.o c_code/1_1/compiler_trees.o c_code/1_1/compiler_magicsys.o c_code/1_1/compiler_nimsets.o c_code/1_1/compiler_bitsets.o c_code/1_1/compiler_lookups.o c_code/1_1/compiler_prettybase.o c_code/1_1/compiler_treetab.o c_code/1_1/compiler_semfold.o c_code/1_1/compiler_procfind.o c_code/1_1/compiler_pragmas.o c_code/1_1/compiler_semtypinst.o c_code/1_1/compiler_transf.o c_code/1_1/compiler_aliases.o c_code/1_1/compiler_cgmeth.o c_code/1_1/compiler_lambdalifting.o c_code/1_1/compiler_evaltempl.o c_code/1_1/compiler_patterns.o c_code/1_1/compiler_parampatterns.o c_code/1_1/compiler_sempass2.o c_code/1_1/compiler_pretty.o c_code/1_1/compiler_semmacrosanity.o c_code/1_1/compiler_semparallel.o c_code/1_1/compiler_lowerings.o c_code/1_1/compiler_pluginsupport.o c_code/1_1/compiler_active.o c_code/1_1/compiler_saturate.o c_code/1_1/docutils_rstast.o c_code/1_1/docutils_rst.o c_code/1_1/docutils_rstgen.o c_code/1_1/docutils_highlite.o c_code/1_1/stdlib_xmltree.o c_code/1_1/stdlib_cgi.o c_code/1_1/compiler_typesrenderer.o c_code/1_1/stdlib_sequtils.o c_code/1_1/compiler_guards.o c_code/1_1/compiler_writetracking.o c_code/1_1/stdlib_cookies.o c_code/1_1/compiler_vmgen.o c_code/1_1/compiler_vmdeps.o c_code/1_1/compiler_vmmarshal.o c_code/1_1/compiler_locals.o c_code/1_1/compiler_itersgen.o c_code/1_1/compiler_cgendata.o c_code/1_1/compiler_ccgmerge.o c_code/1_1/compiler_sighashes.o c_code/1_1/stdlib_md5.o c_code/1_1/stdlib_net.o c_code/1_1/stdlib_nativesockets.o c_code/1_1/compiler_nodejs.o c_code/1_1/compiler_scriptconfig.o