How to pass link option at Windows build?

Robert Lu robberphex at gmail.com
Sun Mar 15 17:52:06 UTC 2020


Hi,
I am trying to build JDK at Windows 10, with cl 19.24.28316 for x64.
I want to build a JDK without ASLR,which needs to set link option /FIXED.

so I tried these options:
bash ./configure --with-debug-level=fastdebug
--with-extra-cflags="/DYNAMICBASE:NO /link /FIXED"
--with-extra-cxxflags="/DYNAMICBASE:NO /link /FIXED"
 --with-extra-ldflags="/FIXED"

But it failed with config.log:

> configure:50131:
> /cygdrive/c/progra~2/micros~1/2019/commun~1/vc/tools/msvc/1424~1.283/bin/hostx86/x64/cl
>   /DYNAMICBASE:NO /link /FIXED    /FIXED conftest.c  >&5
> Microsoft (R) C/C++ Optimizing Compiler Version 19.24.28316 for x64
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
> cl : Command line error D8003 : missing source filename
> configure:50135: $? = 2
> configure:50173: result: no
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME "OpenJDK"
> | #define PACKAGE_TARNAME "openjdk"
> | #define PACKAGE_VERSION "openjdk"
> | #define PACKAGE_STRING "OpenJDK openjdk"
> | #define PACKAGE_BUGREPORT "build-dev at openjdk.java.net"
> | #define PACKAGE_URL "http://openjdk.java.net"
> | /* end confdefs.h.  */
> |
> | int
> | main ()
> | {
> |
> |   ;
> |   return 0;
> | }
>
It looks like LDFLAGS should be after filename for cl.
Is there any option for add LDFLAGS after the filename (instead of before)?
Or is there a new flag?
-- 
Robert Lu <robberphex at gmail.com>
About me: https://www.robberphex.com/about-me



More information about the build-dev mailing list