make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNU make 3.81beta3 - Microsoft compiler 13.10 (.NET 7.1) build


From: Jerker Bäck
Subject: GNU make 3.81beta3 - Microsoft compiler 13.10 (.NET 7.1) build
Date: Fri, 1 Jul 2005 05:31:54 +0200

The nmake build with build_w32.bat works with msc 7.1 series.
Tested with cl 13.10.4035 and Windows 2003 SP1 headers.

There is only one minor bug (reported as bug #13594):

This is due to macro PARAMS is not properly defined in make.h(45)
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
...
should be:
#if defined (__cplusplus) || HAVE_ANSI_COMPILER
or
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__) || defined
WINDOWS32

To be a generalized msc build, the following should be defined in config.h
(derived from config.h.W32):

#define HAVE_FDOPEN                1    (missing) 
#define BATCH_MODE_ONLY_SHELL      1    (currently defined)
#define HAVE_CASE_INSENSITIVE_FS   1    (currently not defined)

However, a more strict and optimimzed build (ie Visual Studio project) may
or may not build depending on settings. The Windows 2003 SP1 DDK (and Visual
C++ Toolkit 2003) will require the following:

Comment out (or otherwise disable):
commands.c(36):     getpid
dir.c(1163):        stat
fnmatch.c(123)      getenv
getopt.c(209):      getenv      (need #include <stdlib.h>)
main.c(77):         chdir
main.c(834):        mktemp
make.h(487):        getcwd
make.h(496):        environ
job.c(178):         dup2
job.c(179):         execve
job.c(180):         _exit
read.c(2922):       getenv

Manually fixing explicit casts of type conversions (warnings 4057, 4242,
4244, 4245, 4018, 4389) (or you can also disable the inclusion of warning.h
by setting COMPILER_WARNINGS=0).

Comment out:
glob.c(204):        #define realloc my_realloc  (ugh)
       and rename all realloc in glob.c to my_realloc

Disable warnings
#pragma warning(disable : 4100)  // unreferenced formal parameter
#pragma warning(disable : 4101)  // unreferenced local variable
#pragma warning(disable : 4102)  // unreferenced label
#pragma warning(disable : 4127)  // conditional expression is constant
#pragma warning(disable : 4130)  // logical operation on address of string
constant
#pragma warning(disable : 4131)  // uses old-style declarator
#pragma warning(disable : 4189)  // local variable is initialized but not
referenced
#pragma warning(disable : 4296)  // expression is always false
#pragma warning(disable : 4307)  // integral constant overflow
#pragma warning(disable : 4702)  // unreachable code
#pragma warning(disable : 4706)  // assignment within conditional expression

explicit declaration of __cdecl calling convention:
main.c(884): int __cdecl main (int argc, char **argv, char **envp)
main.c(64): extern RETSIGTYPE __cdecl fatal_error_signal PARAMS ((int sig));
commands.c(401): RETSIGTYPE __cdecl fatal_error_signal (int sig)
w32\subproc\misc.c(33):int __cdecl compare(const void *a1, const void *a2)
glob\glob.h(136): int (__cdecl *gl_stat) __PMT ((__const char *, struct stat
*));
glob\glob.c(300): static int __cdecl collated_compare __P ((const __ptr_t,
const __ptr_t));
glob\glob.c(1080): static int __cdecl collated_compare (const __ptr_t, const
__ptr_t)
hash.h(58): typedef int (__cdecl *qsort_cmp_t) __P((void const *, void const
*));
make.h(429):extern int __cdecl alpha_compare PARAMS ((const void *, const
void *));
misc.c(61): int __cdecl alpha_compare (const void *v1, const void *v2)

If there is still problems, try the /TC compiler switch
Link with oldnames.lib and BufferOverflowU.lib (security_cookie)

regards
Jerker Bäck 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]