The jpackage build support in Lib-jdk.incubator.jpackage.gmk sets the CFLAGS for building the applauncher to CXXFLAGS_JDKEXE, so using options for compiling C++ code. However, the MacOSX applauncher is written in Objective-C, which may lead to rejection of C++ options. In particular, if the -std= option is present it will be rejected and the build will fail.
The -std= option ought to be specified for all C++ processing (both compiling and linking), to avoid potential inconsistencies. The use of CXXFLAGS_JDKEXE when compiling Objective-C code prevents fixing some places where the -std= option is missing.