gnustep-dev
[Top][All Lists]
Advanced

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

Re: PATCH: suppress deprecation warnings on OS X Leopard


From: Blake Nicholson
Subject: Re: PATCH: suppress deprecation warnings on OS X Leopard
Date: Sun, 30 Mar 2008 15:34:31 -0400

On Mar 30, 2008, at 10:27 AM, Nicola Pero wrote:

On 30 Mar 2008, at 14:55, Blake Nicholson wrote:

Nicola,

Unfortunately, I think the sample output I sent was not a good representation. Sorry about that. I went ahead and built base under apple-apple-apple and redirected stderr to a file. I've attached the file so you can see all the error messages (many, many duplicates). Most of the error messages are from things in objc- gnu2next.h and GSObjCRuntime.h.

Thanks ... OK, so we need to add the -Wno-deprecated everywhere in apple-gnu-gnu (and presumably, if you're compiling the gnustep-base Additions, also on apple-apple-apple).

The right fix still seems to be to update the Apple runtime code in gnustep-base to work with the new runtime if available, but in the meanwhile if we add the -Wno-deprecated flag, we should probably add it inside gnustep-base so that when support for the new runtime is available, we
can remove it in sync. :-)


Agreed. Please note that the option to set is -Wno-deprecated- declarations, not -Wno-deprecated. The latter is specific to C++.

So I think that the right approach is:

* have core/base/configure.ac detect that we're using the "new" Apple runtime [this test will be good in the future as well for when we actually
   add support for the new runtime ;-)]

* in that case, have core/base/configure.ac add -Wno-deprecated to some autoconf output variable (eg, let's call it WNO_DEPRECATED_OBJCFLAGS),
   else leave it empty

* have base.make.in set AUXILIARY_OBJFLAGS += @WNO_DEPRECATED_OBJCFLAGS@ when running with the Apple runtime

Does that make any sense to you ?

Thanks for your help


The one question I have for you is will base.make be included when compiling something else, such as GDL2? Since other projects include GSCategories.h, which includes GSObjCRuntime.h and preface.h, AUXILIARY_OBJCFLAGS needs to be set for GNUstep projects besides base as well.

BTW, it appears that clean_os.sh is a bit out of date (it only goes up through darwin7). Here's a patch that won't require each version of darwin to be listed separately. When the os is like darwin*, it strips everything from the first '.' on. This does introduce a dependency on sed, but my assumption is that any platform that has sh and can run this script will have sed. Do you agree?

Index: clean_os.sh
===================================================================
--- clean_os.sh (revision 26396)
+++ clean_os.sh (working copy)
@@ -32,18 +32,10 @@
        exit 0
        ;;
     # Remove version number for Darwin
-    darwin7*)
-        echo darwin7
+    darwin*)
+        echo `echo "$1" | sed s/\\\\..*//`
         exit 0
         ;;
-    darwin6*)
-        echo darwin6
-        exit 0
-        ;;
-    darwin5*)
-        echo darwin5
-        exit 0
-        ;;
     *)
        echo $1
         exit 0


Thanks,
Blake




reply via email to

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