comparison src/msvc-fftw-1.patch @ 3087:3663f6300abf

[MSVC] enable FFTW compilation - fix cc-msvc when all input files are pushed into @-files by libtool - make libtool think clgfortran is not the GNU Fortran compiler - don't bother compiling long-double version of FFTW, MSVC does not support long double type, it's typedef'ed to double
author Michael Goffioul <michael.goffioul@gmail.com>
date Mon, 24 Jun 2013 22:10:13 -0400
parents
children 537ca0c3354d
comparison
equal deleted inserted replaced
3086:9b848bfe6f10 3087:3663f6300abf
1 diff -ur fftw-3.3.2-orig/api/fftw3.h fftw-3.3.2/api/fftw3.h
2 --- fftw-3.3.2-orig/api/fftw3.h 2012-04-28 10:58:06 -0400
3 +++ fftw-3.3.2/api/fftw3.h 2013-06-24 17:32:40 -0400
4 @@ -82,8 +82,14 @@
5 # else /* user is calling FFTW; import symbol */
6 # define FFTW_EXTERN extern __declspec(dllimport)
7 # endif
8 +# if defined(COMPILING_FFTW_THREADS)
9 +# define FFTW_THREADS_EXTERN extern __declspec(dllexport)
10 +# else
11 +# define FFTW_THREADS_EXTERN extern __declspec(dllimport)
12 +# endif
13 #else
14 # define FFTW_EXTERN extern
15 +# define FFTW_THREADS_EXTERN extern
16 #endif
17
18 enum fftw_r2r_kind_do_not_use_me {
19 @@ -315,9 +321,9 @@
20 \
21 FFTW_EXTERN void X(set_timelimit)(double t); \
22 \
23 -FFTW_EXTERN void X(plan_with_nthreads)(int nthreads); \
24 -FFTW_EXTERN int X(init_threads)(void); \
25 -FFTW_EXTERN void X(cleanup_threads)(void); \
26 +FFTW_THREADS_EXTERN void X(plan_with_nthreads)(int nthreads); \
27 +FFTW_THREADS_EXTERN int X(init_threads)(void); \
28 +FFTW_THREADS_EXTERN void X(cleanup_threads)(void); \
29 \
30 FFTW_EXTERN int X(export_wisdom_to_filename)(const char *filename); \
31 FFTW_EXTERN void X(export_wisdom_to_file)(FILE *output_file); \
32 diff -ur fftw-3.3.2-orig/dft/ct.h fftw-3.3.2/dft/ct.h
33 --- fftw-3.3.2-orig/dft/ct.h 2012-04-28 10:58:06 -0400
34 +++ fftw-3.3.2/dft/ct.h 2013-06-24 15:28:17 -0400
35 @@ -56,7 +56,7 @@
36 ct_solver *X(mksolver_ct)(size_t size, INT r, int dec,
37 ct_mkinferior mkcldw,
38 ct_force_vrecursion force_vrecursionp);
39 -extern ct_solver *(*X(mksolver_ct_hook))(size_t, INT, int,
40 +IFFTW_EXTERN ct_solver *(*X(mksolver_ct_hook))(size_t, INT, int,
41 ct_mkinferior, ct_force_vrecursion);
42
43 void X(regsolver_ct_directw)(planner *plnr,
44 diff -ur fftw-3.3.2-orig/rdft/hc2hc.h fftw-3.3.2/rdft/hc2hc.h
45 --- fftw-3.3.2-orig/rdft/hc2hc.h 2012-04-28 10:58:06 -0400
46 +++ fftw-3.3.2/rdft/hc2hc.h 2013-06-24 15:28:36 -0400
47 @@ -46,7 +46,7 @@
48 };
49
50 hc2hc_solver *X(mksolver_hc2hc)(size_t size, INT r, hc2hc_mkinferior mkcldw);
51 -extern hc2hc_solver *(*X(mksolver_hc2hc_hook))(size_t, INT, hc2hc_mkinferior);
52 +IFFTW_EXTERN hc2hc_solver *(*X(mksolver_hc2hc_hook))(size_t, INT, hc2hc_mkinferior);
53
54 void X(regsolver_hc2hc_direct)(planner *plnr, khc2hc codelet,
55 const hc2hc_desc *desc);
56 diff -ur fftw-3.3.2-orig/tests/Makefile.in fftw-3.3.2/tests/Makefile.in
57 --- fftw-3.3.2-orig/tests/Makefile.in 2012-04-28 10:58:44 -0400
58 +++ fftw-3.3.2/tests/Makefile.in 2013-06-24 19:57:50 -0400
59 @@ -65,7 +65,7 @@
60 $(top_builddir)/libbench2/libbench2.a $(am__DEPENDENCIES_1)
61 bench_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
62 --mode=link $(CCLD) $(bench_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
63 - $(LDFLAGS) -o $@
64 + $(LDFLAGS) -Wl,-subsystem:console -o $@
65 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
66 depcomp = $(SHELL) $(top_srcdir)/depcomp
67 am__depfiles_maybe = depfiles
68 @@ -229,7 +229,7 @@
69 top_srcdir = @top_srcdir@
70 AM_CPPFLAGS = -I$(top_srcdir)/kernel -I$(top_srcdir)/libbench2 \
71 -I$(top_srcdir)/dft -I$(top_srcdir)/rdft -I$(top_srcdir)/reodft \
72 --I$(top_srcdir)/threads -I$(top_srcdir)/api
73 +-I$(top_srcdir)/threads -I$(top_srcdir)/api -DFFTW_DLL
74
75 EXTRA_DIST = check.pl README
76 @OPENMP_TRUE@@THREADS_FALSE@bench_CFLAGS = $(OPENMP_CFLAGS)
77 diff -ur fftw-3.3.2-orig/threads/Makefile.in fftw-3.3.2/threads/Makefile.in
78 --- fftw-3.3.2-orig/threads/Makefile.in 2012-04-28 10:58:44 -0400
79 +++ fftw-3.3.2/threads/Makefile.in 2013-06-24 17:28:37 -0400
80 @@ -291,7 +291,8 @@
81 top_builddir = @top_builddir@
82 top_srcdir = @top_srcdir@
83 AM_CPPFLAGS = -I$(top_srcdir)/kernel -I$(top_srcdir)/dft \
84 --I$(top_srcdir)/rdft -I$(top_srcdir)/api
85 +-I$(top_srcdir)/rdft -I$(top_srcdir)/api \
86 +-DCALLING_FFTW -DCOMPILING_FFTW_THREADS
87
88 AM_CFLAGS = $(STACK_ALIGN_CFLAGS)
89 @OPENMP_FALSE@FFTWOMPLIB =
90 @@ -307,7 +308,7 @@
91 vrank-geq1-rdft2.c f77api.c f77funcs.h
92
93 libfftw3@PREC_SUFFIX@_threads_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
94 -libfftw3@PREC_SUFFIX@_threads_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
95 +libfftw3@PREC_SUFFIX@_threads_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
96 @COMBINED_THREADS_FALSE@libfftw3@PREC_SUFFIX@_threads_la_LIBADD = ../libfftw3@PREC_SUFFIX@.la
97 libfftw3@PREC_SUFFIX@_omp_la_SOURCES = api.c conf.c openmp.c \
98 threads.h dft-vrank-geq1.c ct.c rdft-vrank-geq1.c hc2hc.c \
99 diff -ur fftw-3.3.2-orig/tools/Makefile.in fftw-3.3.2/tools/Makefile.in
100 --- fftw-3.3.2-orig/tools/Makefile.in 2012-04-28 10:58:44 -0400
101 +++ fftw-3.3.2/tools/Makefile.in 2013-06-24 20:01:18 -0400
102 @@ -74,7 +74,7 @@
103 fftw@PREC_SUFFIX@_wisdom_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
104 $(LIBTOOLFLAGS) --mode=link $(CCLD) \
105 $(fftw@PREC_SUFFIX@_wisdom_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
106 - $(LDFLAGS) -o $@
107 + $(LDFLAGS) -Wl,-subsystem:console -o $@
108 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
109 am__vpath_adj = case $$p in \
110 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \