tech-x11 archive

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

Re: xsrc libdrm update policy



>
> One tool we have to detect ABI changes or breakage is .expsym files.
>
> 1. Create an empty file src/external/mit/xorg/lib/libdrm/drm.expsym
>    and make sure the build fails (you can just run `nbmake-$ARCH -C
>    src/external/mit/xorg/lib/libdrm dependall' if you've already done
>    a distribution build, no need to repeat the whole distribution
>    build).
>
> 2. Fill the .expsym file with the `update-symbols' target.
>
> 3. Try updating libdrm itself, and rebuild it.  If the build fails,
>    you can try `update-symbols' again.
>
> At the end of step (3), you may get one of:
>
> WARNING: Symbols added, minor bump required!
> WARNING: Symbols deleted, major bump required!
>

I did it*, and didn't get warnings**,
src/external/mit/xorg/lib/libdrm/drm.expsym
is the same with 2.4.124 and 2.4.134.

* Just rm -rf xsrc/external/mit/libdrm/dist,
cp -R libdrm-2.4.134 xsrc/external/mit/libdrm/dist,
and apply patches from pkgsrc's libdrm with some manual fix.

** The last lines:
....
#     build  libdrm/libdrm.so.3.8
rm -f libdrm.so.3.8
/usr/src/obj/tooldir.NetBSD-11.0_RC4-amd64/bin/x86_64--netbsd-gcc
-shared -Wl,-soname,libdrm.so.3  -Wl,--warn-shared-
textrel -Wl,-Map=libdrm.so.3.map   --sysroot=/ -Wl,-z,relro
-Wl,-rpath,/usr/X11R7/lib -L=/usr/X11R7/lib  -o libdrm.so.
3.8.tmp  -Wl,-rpath-link,/lib  -L=/lib -Wl,-x  -Wl,--whole-archive
libdrm_pic.a  -Wl,--no-whole-archive -L/usr/src/lib
/libm/obj -lm -L/usr/src/lib/libpci/obj -lpci
mv -f libdrm.so.3.8.tmp libdrm.so.3.8
ln -sf libdrm.so.3.8 libdrm.so.3.tmp
mv -f libdrm.so.3.tmp libdrm.so.3
ln -sf libdrm.so.3.8 libdrm.so.tmp
mv -f libdrm.so.tmp libdrm.so
#    create  libdrm/libdrm.so.3.8.actsym
/usr/src/obj/tooldir.NetBSD-11.0_RC4-amd64/bin/x86_64--netbsd-nm
--dynamic --extern-only --defined-only --with-symbol-
versions  libdrm.so.3.8  | cut -d' ' -f3        | grep -Fvx -e _end -e
_fini -e _init | LC_ALL=C sort -u >libdrm.so.3.
8.actsym.tmp
mv -f libdrm.so.3.8.actsym.tmp libdrm.so.3.8.actsym
#    create  libdrm/libdrm.so.3.8.diffsym
if diff -u /usr/src/external/mit/xorg/lib/libdrm/drm.expsym
libdrm.so.3.8.actsym >libdrm.so.3.8.diffsym.tmp; then  mv
-f libdrm.so.3.8.diffsym.tmp libdrm.so.3.8.diffsym;  else  ret=$?;
cat libdrm.so.3.8.diffsym.tmp;  echo libdrm.so.3.8
: error:  actual symbols differ from expected symbols >&2;  exit $ret;  fi
yamato# make -C src/external/mit/xorg/lib/libdrm update-symbols
cp libdrm.so.3.8.actsym /usr/src/external/mit/xorg/lib/libdrm/drm.expsym
yamato#

-- 
Regards,
kikadf



Home | Main Index | Thread Index | Old Index