Error compiling ruby 1.9.2-p180 while upgrading to Rails 3

gcc -shared -o …/…/…/.ext/i686-linux/digest/ md5init.o md5.o -
L. -L…/…/… -L/home/rails3/.rvm/usr,/lib -Wl,-R/home/rails3/.rvm/
usr,/lib -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/
rails3/.rvm/rubies/ruby-1.9.2-p180/lib -L/home/rails3/.rvm/rubies/
ruby-1.9.2-p180/lib -lruby -lpthread -lrt -ldl -lcrypt -lm -lc
/usr/bin/ld: /lib: No such file: File format not recognized
collect2: ld returned 1 exit status
make[1]: *** […/…/…/.ext/i686-linux/digest/] Error 1
make[1]: Leaving directory

looks to my inexperienced eye that each -L takes only one directory,
and -L/home/rails3/.rvm/usr,/lib is breaking things… no idea how to
fix, though

ruby compiled fine without links to openssl and iconv. This was posted
as a way to remove an ‘No such file to load - openssl’ error when
trying to run my rails app under rails 3.0.5.

the command that started all this was:

rvm install 1.9.2 -C --with-openssl-dir=$HOME/.rvm.usr --with-iconv-

Thanks for any help