[MPlayer-dev-eng] [PATCH] Two minor compilation fixes

Sidik Isani lksi at cfht.hawaii.edu
Sun Sep 22 08:34:47 CEST 2002


Hello -

  Thanks for including the NAS and seek patches!  I've just checked
  out the stock mplayer and it works for my application as-is now,
  so I'll work with CVS now.

  FIRST PATCH: This one just notes how I had to comment out a typedef
  in Gui/mplayer/gtk/opts.c that was conflicting with the real typedef.
  Probably this is currently being worked on though...

  SECOND PATCH: This patch would ONLY affect those who configure
  with "--enable-static*", which doesn't work for me as-is.  My
  ld seems to need one of two things when building with -static:
  (1) all the -l's in exactly the right order, OR (2) the group of
  -l's archives surrounded by --start-group ... --end-group.  This
  is from the man page for ld.  I'll never get everyone's libraries
  in the right order, so I opted for (2).  Even if later linkers
  are smarter than mine, I suspect these group options will not hurt
  anything to add this patch?

Be seeing you,

- Sidik
-------------- next part --------------
diff -ru MPlayer-cvs/Gui/mplayer/gtk/opts.c MPlayer-isani/Gui/mplayer/gtk/opts.c
--- MPlayer-cvs/Gui/mplayer/gtk/opts.c	Mon Sep 16 03:22:50 2002
+++ MPlayer-isani/Gui/mplayer/gtk/opts.c	Sat Sep 21 19:06:43 2002
@@ -20,7 +20,7 @@
 #include "fs.h"
 
 typedef struct sh_video_t sh_video_t;
-typedef struct mp_image_t mp_image_t;
+/* typedef struct mp_image_t mp_image_t; */
 typedef struct sh_audio_t sh_audio_t;
 
 #include "../../../libmpcodecs/vd.h"
-------------- next part --------------
diff -ru MPlayer-cvs/Makefile MPlayer-isani/Makefile
--- MPlayer-cvs/Makefile	Thu Sep 19 15:26:38 2002
+++ MPlayer-isani/Makefile	Sat Sep 21 19:14:16 2002
@@ -171,7 +171,7 @@
 
 $(PRG):	$(MPLAYER_DEP)
 	./darwinfixlib.sh $(MPLAYER_DEP)
-	$(CC) $(CFLAGS) -o $(PRG) $(OBJS_MPLAYER) $(VO_LIBS)  $(COMMON_LIBS) $(EXTRA_LIB) $(AO_LIBS) $(V_LIBS) $(VIDIX_LIBS) $(GUI_LIBS)  $(LIRC_LIB) $(STATIC_LIB) 
+	$(CC) $(CFLAGS) -o $(PRG) $(OBJS_MPLAYER) $(STATIC_LIB_START) $(VO_LIBS)  $(COMMON_LIBS) $(EXTRA_LIB) $(AO_LIBS) $(V_LIBS) $(VIDIX_LIBS) $(GUI_LIBS)  $(LIRC_LIB) $(STATIC_LIB) 
 
 $(PRG_FIBMAP): fibmap_mplayer.o
 	$(CC) -o $(PRG_FIBMAP) fibmap_mplayer.o
diff -ru MPlayer-cvs/configure MPlayer-isani/configure
--- MPlayer-cvs/configure	Thu Sep 19 15:26:39 2002
+++ MPlayer-isani/configure	Sat Sep 21 19:08:18 2002
@@ -29,9 +29,9 @@
   echo >> "$TMPLOG"
   cat "$TMPC" >> "$TMPLOG"
   echo >> "$TMPLOG"
-  echo "$_cc $_inc_extra $_ld_static $_ld_extra $TMPC -o $TMPO $@" >> "$TMPLOG"
+  echo "$_cc $_inc_extra $TMPC -o $TMPO $@ $_ld_static_start $_ld_extra $_ld_static" >> "$TMPLOG"
   rm -f "$TMPO"
-  ( "$_cc" $_inc_extra $_ld_static $_ld_extra "$TMPC" -o "$TMPO" "$@" ) >> "$TMPLOG" 2>&1
+  ( "$_cc" $_inc_extra "$TMPC" -o "$TMPO" "$@" $_ld_static_start $_ld_extra $_ld_static ) >> "$TMPLOG" 2>&1
   TMP="$?"
   echo >> "$TMPLOG"
   echo "ldd $TMPO" >> "$TMPLOG"
@@ -283,13 +283,15 @@
     _skip_cc_check=yes
     ;;
   --enable-static)
-    _ld_static='-static'
+    _ld_static_start='-static -Wl,--start-group'
+    _ld_static='-Wl,--end-group'
     ;;
   --disable-static)
     _ld_static=''
     ;;
   --enable-static=*)
-    _ld_static="-static `echo $ac_option | cut -d '=' -f 2`"
+    _ld_static_start='-static -Wl,--start-group'
+    _ld_static="`echo $ac_option | cut -d '=' -f 2` -Wl,--end-group"
     ;;
   --with-extraincdir=*)
     _inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
@@ -4361,8 +4363,9 @@
 GIF = $_mkf_gif
 
 EXTRA_LIB = $_ld_extra
-Z_LIB =  $_ld_static $_ld_zlib
+Z_LIB =  $_ld_zlib
 HAVE_MLIB = $_mlib
+STATIC_LIB_START = $_ld_static_start
 STATIC_LIB = $_ld_static
 
 X11_INC = $_inc_x11
@@ -4439,9 +4442,9 @@
 TARGET_SSE = $_sse
 
 # --- GUI stuff ---
-GTKLIB = $_ld_static $_ld_gtk
-GLIBLIB = $_ld_static  $_ld_glib
-GTK_LIBS =  $_ld_static $_ld_gui
+GTKLIB = $_ld_gtk
+GLIBLIB = $_ld_glib
+GTK_LIBS = $_ld_gui
 GUI = $_gui
 DEBUG = -DDEBUG
 


More information about the MPlayer-dev-eng mailing list