rstudio / sass

Sass compiler package for R
https://rstudio.github.io/sass/
Other
102 stars 17 forks source link

warning: argument unused during compilation: '-stdlib=libc++' #129

Closed cpsievert closed 1 year ago

cpsievert commented 1 year ago

CRAN has requested the following warning be fixed (this is essentially duplicate of https://github.com/rstudio/sass/issues/120)

(Changes should be verified with https://mac.r-project.org/macbuilder/submit.html)

* checking whether package ‘sass’ can be installed ... [63s/63s] WARNING
Found the following significant warnings:
   clang: warning: argument unused during compilation: '-stdlib=libc++'
[-Wunused-command-line-argument]

from

clang -falign-functions=8 -g -O2 -Wall -pedantic -Wconversion
-Wno-sign-conversion -Wstrict-prototypes  -O2 -I ./include
-stdlib=libc++ -fPIC -c -o src/cencode.o src/cencode.c
clang: warning: argument unused during compilation: '-stdlib=libc++'
[-Wunused-command-line-argument]

-stdlib-libc++ is (obviously) a C++ option, and the latest Apple Clang
is objecting to its being passed to the C compiler.  You have

sass/src/libsass/Makefile:

ifeq ($(UNAME),Darwin)
         CFLAGS += -stdlib=libc++
         CXXFLAGS += -stdlib=libc++
         LDFLAGS += -stdlib=libc++
endif

where CFLAGS is plainly wrong, and the rest are unneeded for Apple
clang, and potentially wrong if someone chose to use GCC (which has been
done, e.g. by HomeBrew).