Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8196896

Use SYSROOT_CFLAGS in dtrace gensrc

XMLWordPrintable

    • b16

      In JDK-8158556, we discovered places where CC is called without SYSROOT_CFLAGS. This is no good, and should be fixed.

      Quoting JDK-8158556:

      Ihse: Calling CC directly without going through SetupNativeCompilation sounds problematic. :( We're missing SYSROOT_CFLAGS but god knows what else. I grepped through the source to find more such instances, there are a few:

      jdk/make/gensrc/GensrcX11Wrappers.gmk: (cd $(@D) && $(CC) $(MEMORY_MODEL_FLAG) -o $@ $< \
      hotspot/make/gensrc/GensrcDtrace.gmk: ( $(CC) -E $(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d ) )
      hotspot/make/lib/CompileDtracePostJvm.gmk: $(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, $(CC) -E \
      hotspot/make/lib/CompileDtracePostJvm.gmk: # $(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, $(CC) -E \

      Regardless of anything else, we should file a separate bug to see if these can be converted to SetupNativeCompilation, or if we need to add some kind of "lightweight SetupNativeCompilation" that at least provides proper sysroot CFLAGS.

      ---

      Erik: The other instances are for running the preprocessor. I agree we need to make sure SYSROOT_CFLAGS is added there to.

            ihse Magnus Ihse Bursie
            ihse Magnus Ihse Bursie
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: